|
@@ -26,6 +26,16 @@ class Textarea extends Component {
|
|
|
}
|
|
|
handleFocus(e){ //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
|
|
|
const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark} = this.props;
|
|
|
+ //黏贴时去掉html格式
|
|
|
+ const that = this;
|
|
|
+ let txt = '';
|
|
|
+ $(this.$dom.current).on("paste",function(e){
|
|
|
+ setTimeout(function(){
|
|
|
+ txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
|
|
|
+ that.$dom.current.innerHTML = txt;
|
|
|
+ that.moveEnd($(that.$dom.current)[0]); //光标落到最后去
|
|
|
+ });
|
|
|
+ });
|
|
|
//const {inpText} = this.state;console.log(inpText,boxMark,hasMain)
|
|
|
if(boxMark!='1'&&!hasMain&&!e.target.innerText){
|
|
|
//现病史、其他史无主诉且本身无内容是聚焦提示无法操作
|
|
@@ -104,6 +114,8 @@ class Textarea extends Component {
|
|
|
handleBlur(e){
|
|
|
const {saveChronic} = this.props;
|
|
|
const text = e.target.innerText || e.target.innerHTML;
|
|
|
+ //解除绑定事件
|
|
|
+ $(this.$dom.current).off("paste");
|
|
|
getFeature(text).then((res)=>{
|
|
|
if(res.data.code==0){
|
|
|
const result = res.data.data;
|