|
@@ -18,7 +18,7 @@ class Textarea extends Component {
|
|
handleInput(e){
|
|
handleInput(e){
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
const {handleChangeAssistValue,idx,handlePush} = this.props;
|
|
const {handleChangeAssistValue,idx,handlePush} = this.props;
|
|
- const text = e.target.innerText || e.target.innerHTML;
|
|
|
|
|
|
+ const text = e.target.innerHTML;
|
|
const stimer = this.state.timer;
|
|
const stimer = this.state.timer;
|
|
handleChangeAssistValue&&handleChangeAssistValue(text);
|
|
handleChangeAssistValue&&handleChangeAssistValue(text);
|
|
|
|
|
|
@@ -36,7 +36,7 @@ class Textarea extends Component {
|
|
// // 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||'');
|
|
// }
|
|
// }
|
|
if(next.isRead != isRead && next.value || next.isRead != isRead && next.value!=this.props.value){ //value对比解决复诊不显示bug
|
|
if(next.isRead != isRead && next.value || next.isRead != isRead && next.value!=this.props.value){ //value对比解决复诊不显示bug
|
|
- next.value ? this.$dom.current.innerText = next.value : this.$dom.current.innerText = ''
|
|
|
|
|
|
+ next.value ? this.$dom.current.innerHTML = next.value : this.$dom.current.innerHTML = ''
|
|
// 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||'');
|
|
}
|
|
}
|
|
if(next.typeConfig != typeConfig) {
|
|
if(next.typeConfig != typeConfig) {
|
|
@@ -46,7 +46,7 @@ class Textarea extends Component {
|
|
componentDidMount(){
|
|
componentDidMount(){
|
|
const {value} = this.props;
|
|
const {value} = this.props;
|
|
if(value && value.trim()){
|
|
if(value && value.trim()){
|
|
- this.$dom.current.innerText = value
|
|
|
|
|
|
+ this.$dom.current.innerHTML = value
|
|
// this.$dom.current.focus()
|
|
// this.$dom.current.focus()
|
|
// this.$dom.current.innerText ? (this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
|
|
// this.$dom.current.innerText ? (this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
|
|
// this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
|
|
// this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
|
|
@@ -62,6 +62,7 @@ class Textarea extends Component {
|
|
ref={this.$dom}
|
|
ref={this.$dom}
|
|
onInput={this.handleInput}
|
|
onInput={this.handleInput}
|
|
onKeyUp={this.handleInput}
|
|
onKeyUp={this.handleInput}
|
|
|
|
+ onkeydown={(e) => {e.stopPropagation()}}
|
|
></div>
|
|
></div>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|