king
2021-09-17 eb0c4703ec7cd21dc921ae113b7e3be69c641c1d
src/menu/components/share/clockcomponent/index.jsx
@@ -10,14 +10,12 @@
class ClockComponent extends Component {
  static propTpyes = {
    btnlog: PropTypes.array,
    updateConfig: PropTypes.func
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    visible: false,
    timer: '',
    visible: false
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -25,11 +23,8 @@
  }
  trigger = () => {
    const { config } = this.props
    this.setState({
      visible: true,
      timer: config.timer || ''
      visible: true
    })
  }
@@ -45,7 +40,8 @@
  }
  render () {
    const { visible, loading, timer } = this.state
    const { config } = this.props
    const { visible, loading } = this.state
    return (
      <div className="clock-component-wrap">
@@ -60,7 +56,7 @@
          onCancel={() => this.setState({ visible: false })}
          destroyOnClose
        >
          <ClockForm timer={timer} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
          <ClockForm config={config} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
        </Modal>
      </div>
    )