UNPKG

node-swallowjs

Version:

epp portal

41 lines (40 loc) 1.18 kB
var ShowDomainResolve = React.createClass({ mixins: [FormMixin], getInitialState() { return {name:'', value:''} }, handleSubmit(e) { api.show('resolve', TRIM(this.state.name), function(code, data) { this.setState({value: data}); }.bind(this)); }, render() { return ( <div> <table align="center" border="0" className="formtable"> <tbody> <tr> <td align="center">{this.props.children}</td> </tr> <tr> <td> <input {...this.linkState({ name: 'name', type: 'text', size: '40', onFocus: this.onSetState({name:'', value:''}) })}/> </td> </tr> <tr> <td align="center"> <input type="button" value="提交" onClick={this.handleSubmit}/> </td> </tr> </tbody> </table> <OpResult content={this.state.value} /> </div> ); } });