From eebe63a6727e6495321d1433ebd2779b5a36d45a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 31 十二月 2020 22:08:14 +0800 Subject: [PATCH] 2020-12-31 --- src/menu/components/share/actioncomponent/index.jsx | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index 4d8860e..6bcdbae 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -58,7 +58,6 @@ */ UNSAFE_componentWillReceiveProps (nextProps) { const { actionlist } = this.state - if (!is(fromJS(nextProps.config.action), fromJS(this.props.config.action)) && !is(fromJS(nextProps.config.action), fromJS(actionlist))) { this.setState({actionlist: fromJS(nextProps.config.action).toJS()}) } @@ -324,19 +323,19 @@ _actionlist = _actionlist.filter(item => item.uuid !== card.uuid) - let delButtons = sessionStorage.getItem('delButtons') - try { - delButtons = JSON.parse(delButtons) - delButtons.push(card.uuid) - } catch { - delButtons = [card.uuid] + if (!card.origin) { + MKEmitter.emit('delButtons', [card.uuid]) } - sessionStorage.setItem('delButtons', JSON.stringify(delButtons)) + + let btnlog = config.btnlog || [] + if (card.OpenType === 'popview' || card.verify || card.modal) { + btnlog.push(card) + } _this.setState({ actionlist: _actionlist }, () => { - _this.props.updateaction({...config, action: _actionlist}) + _this.props.updateaction({...config, action: _actionlist, btnlog}) }) }, onCancel() {} -- Gitblit v1.8.0