From f3ec8c20eeabee6eaab1508d2f3896c28aab611c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 22 七月 2021 14:42:42 +0800 Subject: [PATCH] 修改页面中按钮保存 --- src/menu/components/share/actioncomponent/index.jsx | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index 7c9c615..32764df 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -32,6 +32,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + appType: sessionStorage.getItem('appType'), card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 actionlist: null, // 鎸夐挳缁� @@ -273,7 +274,7 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict } = this.state + const { dict, appType } = this.state let _this = this confirm({ @@ -282,10 +283,6 @@ let _actionlist = fromJS(_this.state.actionlist).toJS() _actionlist = _actionlist.filter(item => item.uuid !== card.uuid) - - if (!card.origin) { - MKEmitter.emit('delButtons', [card.uuid]) - } let btnlog = config.btnlog || [] if (card.OpenType === 'popview' || card.verify || card.modal) { @@ -297,6 +294,11 @@ }, () => { _this.props.updateaction({...config, action: _actionlist, btnlog}) }) + + if (card.origin || appType === 'mob') return + if (appType === 'pc' && card.OpenType !== 'popview') return + + MKEmitter.emit('delButtons', [card.uuid]) }, onCancel() {} }) -- Gitblit v1.8.0