|
@@ -158,7 +158,8 @@ class Textarea extends Component {
|
|
componentWillReceiveProps(next){
|
|
componentWillReceiveProps(next){
|
|
const isRead = this.props.isRead;
|
|
const isRead = this.props.isRead;
|
|
if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){ //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
|
|
if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){ //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
|
|
- this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
|
|
|
|
|
|
+ //this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
|
|
|
|
+ this.$dom.current.innerHTML = next.value||''; //ff26下不支持innerText,但ref会自动加上innerText属性,所以上面的判断不为空
|
|
this.setState({
|
|
this.setState({
|
|
inpText:''
|
|
inpText:''
|
|
});
|
|
});
|
|
@@ -167,7 +168,8 @@ class Textarea extends Component {
|
|
componentDidMount(){
|
|
componentDidMount(){
|
|
const {value} = this.props;
|
|
const {value} = this.props;
|
|
if(value){
|
|
if(value){
|
|
- this.$dom.current.innerText?(this.$dom.current.innerText = value||''):(this.$dom.current.innerText=value||'');
|
|
|
|
|
|
+ //this.$dom.current.innerText?(this.$dom.current.innerText = value||''):(this.$dom.current.innerText=value||'');
|
|
|
|
+ this.$dom.current.innerText=value||'';
|
|
}
|
|
}
|
|
if(isIE()){
|
|
if(isIE()){
|
|
$(this.$dom.current).onIe8Input(function(e){
|
|
$(this.$dom.current).onIe8Input(function(e){
|