瀏覽代碼

评估说明不显示bug修改1329

zhouna 6 年之前
父節點
當前提交
9c24780e92
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/components/AssessResult/ScaleItem/index.jsx

+ 8 - 0
src/components/AssessResult/ScaleItem/index.jsx

@@ -325,6 +325,14 @@ class ScaleItem extends Component {
       text
     });
   }
+  componentWillReceiveProps(next){        //修复bug1329,第二次保存值不显示
+    if(next.text!=this.state.text){
+      this.setState({
+        text:next.text
+      });
+    this.$area.current.value=next.text;
+    }
+  }
   render() {
     const {title,handleInp,disabled,isRecommend} = this.props;
     return <div className={style['assess-item']}>