From fdce913ce7b9d55c34a2abd7a94ee377a4869b9a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 21 三月 2025 19:57:24 +0800 Subject: [PATCH] 2025-03-21 --- src/templates/sharecomponent/searchcomponent/index.jsx | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 16dcefa..fb583c6 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -42,12 +42,15 @@ componentDidMount () { MKEmitter.addListener('plusSearch', this.plusSearch) - // MKEmitter.addListener('revert', this.revert) + MKEmitter.addListener('revert', this.revert) } - // revert = () => { - // this.setState({searchlist: fromJS(this.props.config.search).toJS()}) - // } + // dms-trans + revert = (id, type) => { + if (id !== this.props.config.uuid || type !== 'search') return + + this.setState({searchlist: fromJS(this.props.config.search).toJS()}) + } plusSearch = (MenuId, item, type) => { const { config } = this.props @@ -319,7 +322,7 @@ this.setState = () => { return } - // MKEmitter.removeListener('revert', this.revert) + MKEmitter.removeListener('revert', this.revert) MKEmitter.removeListener('plusSearch', this.plusSearch) } -- Gitblit v1.8.0