king
2020-01-03 862b6cf69dc925a6138a7ebf79b782a5d7791202
src/components/sidemenu/editthdmenu/preview/index.jsx
@@ -43,12 +43,18 @@
  }
  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>
        }