Explorar o código

文本字数限制bug回退

zhouna %!s(int64=5) %!d(string=hai) anos
pai
achega
2a68c63756
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/common/components/Textarea/index.jsx

+ 1 - 1
src/common/components/Textarea/index.jsx

@@ -58,7 +58,7 @@ class Textarea extends Component {
       return ;
     }
     if(boxMark=='1'&&text.length>config.limited){           //主诉字符数限制
-      e.target.innerText?(e.target.innerText = value||''):(e.target.innerHTML = value||'');
+      e.target.innerText?(e.target.innerText = text.substr(0,config.limited)):(e.target.innerHTML = text.substr(0,config.limited));
       e.target.blur();
       Notify.error(config.limitText);
       if(overFlag){