diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb index c67a8b57..9904f602 100644 --- a/app/views/libraries/_form.html.erb +++ b/app/views/libraries/_form.html.erb @@ -145,10 +145,21 @@ if (!title || title.length == 0) { $("#title_notice").removeClass("none"); + $("#title_notice").html("请输入标题"); return }else{ $("#title_notice").addClass("none"); } + + if (!title || title.length >10) { + $("#title_notice").removeClass("none"); + $("#title_notice").html("字数不能超过10个字"); + return + }else{ + $("#title_notice").addClass("none"); + } + + if (!content || content.length == 0) { $("#des_notice").removeClass("none"); return diff --git a/public/react/src/modules/tpm/SiderBar.js b/public/react/src/modules/tpm/SiderBar.js index a2172e48..fd74c759 100644 --- a/public/react/src/modules/tpm/SiderBar.js +++ b/public/react/src/modules/tpm/SiderBar.js @@ -53,7 +53,7 @@ class SiderBar extends Component {
- +