king
2025-04-21 f3d4db769ba9b51b799d981511a710fd443d0e08
src/menu/components/share/clockcomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Modal } from 'antd'
import { Modal } from 'antd'
import { ClockCircleOutlined } from '@ant-design/icons'
import ClockForm from './settingform'
import './index.scss'
@@ -13,10 +13,6 @@
  state = {
    visible: false
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  trigger = () => {
@@ -32,7 +28,7 @@
      this.setState({
        visible: false
      })
      this.props.updateConfig({...config, timer: res.timer, clearField: res.clearField || '', clearValue: res.clearValue || ''})
      this.props.updateConfig({...config, timer: res.timer, timerRepeats: res.timerRepeats, clearField: res.clearField || '', clearValue: res.clearValue || ''})
    })
  }
@@ -41,8 +37,8 @@
    const { visible, loading } = this.state
    return (
      <div className="clock-component-wrap">
        <Icon type="clock-circle" title="定时器" onClick={this.trigger} />
      <div className={'clock-component-wrap' + (config.timer ? ' tip-sign' : '')}>
        <ClockCircleOutlined title="定时器" onClick={this.trigger} />
        <Modal
          title="定时器设置"
          visible={visible}