From fb64bcf1fab18b33d21470c83f28d4cda8d309ce Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 26 十月 2022 12:15:59 +0800 Subject: [PATCH] 2022-10-26 --- src/menu/components/card/data-card/index.jsx | 59 +++-------------------------------------------------------- 1 files changed, 3 insertions(+), 56 deletions(-) diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index bc8b505..574a653 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -276,7 +276,6 @@ * @description 鍗曚釜鍗$墖淇℃伅鏇存柊 */ deleteCard = (cell) => { - const { appType } = this.state let card = fromJS(this.state.card).toJS() let _this = this @@ -286,25 +285,6 @@ card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid) _this.updateComponent(card) - - if (appType === 'mob') return - - let uuids = [] - - cell.elements && cell.elements.forEach(c => { - if (c.eleType !== 'button' || (appType === 'pc' && c.OpenType !== 'popview')) return - - uuids.push(c.uuid) - }) - cell.backElements && cell.backElements.forEach(c => { - if (c.eleType !== 'button' || (appType === 'pc' && c.OpenType !== 'popview')) return - - uuids.push(c.uuid) - }) - - if (uuids.length === 0) return - - MKEmitter.emit('delButtons', uuids) }, onCancel() {} }) @@ -512,7 +492,6 @@ res.$cardType = 'extendCard' res.setting.width = res.setting.width || 6 - let copyBtns = [] let mobtypes = ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'] let elements = [] @@ -527,16 +506,7 @@ } else if (appType === 'mob' && !mobtypes.includes(cell.OpenType)) { return } else { - let _uuid = Utils.getuuid() - - if (cell.OpenType === 'popview') { - let _cell = fromJS(cell).toJS() - _cell.$originUuid = _cell.uuid - _cell.uuid = _uuid - copyBtns.push(_cell) - } - - cell.uuid = _uuid + cell.uuid = Utils.getuuid() elements.push(cell) } }) @@ -557,26 +527,13 @@ } else if (appType === 'mob' && !mobtypes.includes(cell.OpenType)) { return } else { - let _uuid = Utils.getuuid() - - if (cell.OpenType === 'popview') { - let _cell = fromJS(cell).toJS() - _cell.$originUuid = _cell.uuid - _cell.uuid = _uuid - copyBtns.push(_cell) - } - - cell.uuid = _uuid + cell.uuid = Utils.getuuid() backElements.push(cell) } }) } res.backElements = backElements - - if (copyBtns.length > 0) { - MKEmitter.emit('copyButtons', copyBtns) - } resolve({status: true}) @@ -613,19 +570,9 @@ if (appType === 'mob' && !['pop', 'prompt', 'exec', 'innerpage'].includes(res.OpenType)) { resolve({status: false, message: '绉诲姩绔笉鏀寔姝ょ被鍨嬬殑鎸夐挳銆�'}) } else { - let _uuid = Utils.getuuid() - - if (res.OpenType === 'popview') { - let _cell = fromJS(res).toJS() - _cell.$originUuid = _cell.uuid - _cell.uuid = _uuid - - MKEmitter.emit('copyButtons', [_cell]) - } - resolve({status: true}) - res.uuid = _uuid + res.uuid = Utils.getuuid() this.addButton(res) } } -- Gitblit v1.8.0