|
@@ -13,7 +13,6 @@ class Textarea extends Component {
|
|
this.$dom = React.createRef();
|
|
this.$dom = React.createRef();
|
|
this.$domW = React.createRef();
|
|
this.$domW = React.createRef();
|
|
this.handleInput = this.handleInput.bind(this);
|
|
this.handleInput = this.handleInput.bind(this);
|
|
- this.handleFocus = this.handleFocus.bind(this);
|
|
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
}
|
|
}
|
|
handleInput(e){
|
|
handleInput(e){
|
|
@@ -60,10 +59,6 @@ class Textarea extends Component {
|
|
this.$dom.current.nextSibling.innerText = '报告描述或意见'
|
|
this.$dom.current.nextSibling.innerText = '报告描述或意见'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- handleFocus(e){
|
|
|
|
- console.log(e.target.nextSibling)
|
|
|
|
- // e.target.nextSibling.innerText = ''
|
|
|
|
- }
|
|
|
|
handleBlur(e){
|
|
handleBlur(e){
|
|
let str = e.target.innerText
|
|
let str = e.target.innerText
|
|
if(str.trim() == ''){
|
|
if(str.trim() == ''){
|
|
@@ -78,7 +73,6 @@ class Textarea extends Component {
|
|
contenteditable={true}
|
|
contenteditable={true}
|
|
ref={this.$dom}
|
|
ref={this.$dom}
|
|
onInput={this.handleInput}
|
|
onInput={this.handleInput}
|
|
- onFocus={this.handleFocus}
|
|
|
|
onBlur={this.handleBlur}
|
|
onBlur={this.handleBlur}
|
|
onPropertyChange={this.handleInput}
|
|
onPropertyChange={this.handleInput}
|
|
></div>
|
|
></div>
|