| | |
| | | } else { |
| | | this.setState({type: type, textInput: '', value: null}) |
| | | } |
| | | |
| | | let node = document.getElementById('trans-input') |
| | | node && node.focus() |
| | | } |
| | | |
| | | trans = () => { |
| | |
| | | </div> |
| | | <div className="input-wrap"> |
| | | <Button onClick={this.trans}>转换</Button> |
| | | <TextArea value={textInput} autoSize={{minRows: 10, maxRows: 10}} onChange={this.changeVal}/> |
| | | <TextArea value={textInput} id="trans-input" autoSize={{minRows: 10, maxRows: 10}} onChange={this.changeVal}/> |
| | | </div> |
| | | <div className="result-wrap"> |
| | | <Button onClick={this.copy}>复制</Button> |