From bdfec44c9f3a37dbbe05bf14a252ffec04132a86 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 21:24:28 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/card/cardcellcomponent/index.jsx | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index cd73458..146bf94 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -66,7 +66,6 @@ } componentDidMount () { - MKEmitter.addListener('submitStyle', this.getStyle) MKEmitter.addListener('submitModal', this.handleSave) MKEmitter.addListener('cardAddElement', this.cardAddElement) MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) @@ -95,7 +94,6 @@ this.setState = () => { return } - MKEmitter.removeListener('submitStyle', this.getStyle) MKEmitter.removeListener('submitModal', this.handleSave) MKEmitter.removeListener('cardAddElement', this.cardAddElement) MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) @@ -141,8 +139,6 @@ } handleStyle = (element) => { - const { cards, cardCell } = this.props - let _style = element.style ? fromJS(element.style).toJS() : {} let options = ['font', 'border', 'padding', 'margin', 'background'] @@ -169,14 +165,11 @@ card: element }) - MKEmitter.emit('changeStyle', [cards.uuid, cardCell.uuid, element.uuid], options, _style) + MKEmitter.emit('changeStyle', options, _style, this.getStyle) } - getStyle = (comIds, style) => { - const { cards, cardCell } = this.props + getStyle = (style) => { const { card, elements } = this.state - - if (comIds.length !== 3 || comIds[0] !== cards.uuid || comIds[1] !== cardCell.uuid || !card) return // if (card.eleType === 'button') { // if ((style.paddingLeft || style.paddingRight) && !style.width) { @@ -430,6 +423,7 @@ res.eleType = cell.eleType || null res.style = cell.style || null res.modal = cell.modal || null + res.wrapStyle = cell.wrapStyle || null // res = {...cell, ...res} // if (!res.control) { -- Gitblit v1.8.0