From c98e45bfac25e9110ad0383faac54a54d98ea9d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 十一月 2021 20:47:04 +0800 Subject: [PATCH] 2021-11-18 --- src/menu/components/share/actioncomponent/index.jsx | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index 7de5d31..ea3fb0c 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, // 鎸夐挳缁� @@ -115,7 +116,7 @@ const { config } = this.props let _style = element.style ? fromJS(element.style).toJS() : {} - let options = ['font', 'border', 'background', 'margin'] + let options = ['font', 'border', 'background', 'margin', 'padding'] this.setState({ card: element @@ -159,7 +160,7 @@ if (usefulFields) { try { usefulFields = JSON.parse(usefulFields) - } catch { + } catch (e) { usefulFields = [] } } else { @@ -175,19 +176,19 @@ if (menulist) { try { menulist = JSON.parse(menulist) - } catch { + } catch (e) { menulist = [] } } else { menulist = [] } - let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid) + let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid) || [] this.setState({ visible: true, card: card, - formlist: getActionForm(card, functip, config.setting, usefulFields, this.props.type, menulist, modules) + formlist: getActionForm(card, functip, config, usefulFields, this.props.type, menulist, modules) }) } @@ -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() {} }) @@ -404,8 +406,8 @@ * @description 鎸夐挳鍙屽嚮瑙﹀彂瀛愰厤缃� */ btnDoubleClick = (element) => { - if (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false') return - + if (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') === 'true') return + if (element.OpenType === 'pop' || element.OpenType === 'popview' || element.execMode === 'pop') { this.props.setSubConfig(element) } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'page') { @@ -413,11 +415,7 @@ } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'linkpage') { MKEmitter.emit('changeEditMenu', {MenuID: element.linkmenu}) } else { - notification.warning({ - top: 92, - message: '姝ゆ寜閽棤瀛愰厤缃」锛�', - duration: 5 - }) + this.handleAction(element) } } @@ -492,7 +490,7 @@ {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal wrapClassName="model-table-action-verify-modal" - title={'楠岃瘉淇℃伅'} + title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'} visible={profVisible} width={'75vw'} maskClosable={false} -- Gitblit v1.8.0