king
2021-01-15 455bdae0e5e1d9f66a552f74707f825c8b49ee5a
src/menu/components/share/usercomponent/index.jsx
@@ -21,7 +21,8 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    visible: false,
    loading: false
    loading: false,
    name: ''
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -29,9 +30,12 @@
  }
  trigger = () => {
    const { config } = this.props
    this.setState({
      visible: true,
      loading: false
      loading: false,
      name: window.GLOB.UserComponentMap.get(config.uuid) || config.name || ''
    })
  }
@@ -91,7 +95,7 @@
  }
  render () {
    const { visible, dict, loading } = this.state
    const { visible, dict, loading, name } = this.state
    return (
      <div className="user-component-wrap">
@@ -107,7 +111,7 @@
          onCancel={this.cancel}
          destroyOnClose
        >
          <UserForm dict={dict} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
          <UserForm dict={dict} name={name} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
        </Modal>
      </div>
    )