Explorar el Código

文本字数限制bug回退

zhouna hace 5 años
padre
commit
2a68c63756
Se han modificado 1 ficheros con 1 adiciones y 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){