From e55f8ac3069531c1a5a87061d9b8a46b2b625a28 Mon Sep 17 00:00:00 2001 From: yirenyishi Date: Sun, 2 Dec 2018 20:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/css/newblog.css | 1 + views/newblog.html | 2 +- views/note.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/css/newblog.css b/static/css/newblog.css index a0dea33..95d8272 100644 --- a/static/css/newblog.css +++ b/static/css/newblog.css @@ -4,6 +4,7 @@ line-height: 50px; } .blog-title input{ + padding-left: 12px; flex: 1; height: 44px; border: 0; diff --git a/views/newblog.html b/views/newblog.html index 7d4f28e..3fb36d7 100644 --- a/views/newblog.html +++ b/views/newblog.html @@ -61,7 +61,7 @@ return } tobj.title = $("#blog-title").val(); - if (editor.txt.text().trim().length == 0) { + if (editor.txt.html().trim().length == 0) { layer.msg('文章内容不能为空哦', function () { }); return diff --git a/views/note.html b/views/note.html index 8255758..8c8f890 100644 --- a/views/note.html +++ b/views/note.html @@ -116,7 +116,7 @@ return } var noteHtml = editor.txt.html() - if (!editor.txt.text() && editor.txt.text().trim().length == 0) { + if (!editor.txt.html() && editor.txt.html().trim().length == 0) { layer.msg('保存内容为空', function () { }); return