| | |
| | | } |
| | | |
| | | render () { |
| | | const { template } = this.props |
| | | let type = 'sys' |
| | | if (!template || !template.isSystem) { |
| | | type = 'user' |
| | | } |
| | | |
| | | return ( |
| | | <div> |
| | | {this.state.url && |
| | | {this.state.url && this.props.template && |
| | | <div className={'preview-box ' + (this.state.show ? 'active' : '')} onClick={this.close}> |
| | | <Button shape="circle" icon="close"></Button> |
| | | <Button type="primary" onClick={() => {this.props.confirm(this.props.template)}}>使用模板</Button> |
| | | <Button type="primary" onClick={() => {this.props.confirm(this.props.template, type)}}>使用模板</Button> |
| | | {this.state.url && <img src={this.state.url} alt=""/>} |
| | | </div> |
| | | } |