From 5b166dd93003adb0749002d74109a519f746e204 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 03 八月 2024 16:49:15 +0800 Subject: [PATCH] 2024-08-03 --- src/menu/components/share/clockcomponent/index.jsx | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/menu/components/share/clockcomponent/index.jsx b/src/menu/components/share/clockcomponent/index.jsx index c73e5ab..24de95e 100644 --- a/src/menu/components/share/clockcomponent/index.jsx +++ b/src/menu/components/share/clockcomponent/index.jsx @@ -1,10 +1,8 @@ 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 zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import ClockForm from './settingform' import './index.scss' @@ -14,12 +12,7 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false - } - - shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.state), fromJS(nextState)) } trigger = () => { @@ -35,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 || ''}) }) } @@ -44,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} -- Gitblit v1.8.0