From 8040a18c4b2a848d252bf01838f06c7aec1be9f3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 07 六月 2024 15:16:11 +0800 Subject: [PATCH] 2024-06-07 --- src/menu/components/share/actioncomponent/index.jsx | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index 4029b06..27bde39 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -120,7 +120,17 @@ const { card, actionlist } = this.state let _card = fromJS(card).toJS() - _card.style = style + _card.style = fromJS(style).toJS() + + if (_card.style.paddingLeft === '15px') { + delete _card.style.paddingLeft + } + if (_card.style.paddingRight === '15px') { + delete _card.style.paddingRight + } + if (_card.style.minHeight === '28px') { + delete _card.style.minHeight + } let _actionlist = actionlist.map(cell => { if (cell.uuid === _card.uuid) return _card @@ -138,6 +148,10 @@ let _style = element.style ? fromJS(element.style).toJS() : {} let options = ['font', 'border', 'background', 'margin', 'padding', 'minHeight'] + _style.paddingLeft = _style.paddingLeft || '15px' + _style.paddingRight = _style.paddingRight || '15px' + _style.minHeight = _style.minHeight || '28px' + this.setState({ card: element }) @@ -148,6 +162,8 @@ addButton = (cardId, element) => { if (cardId !== this.props.config.uuid) return + delete element.eleType + const { actionlist } = this.state this.setState({actionlist: [...actionlist, element]}) @@ -718,6 +734,7 @@ destroyOnClose > <ActionForm + type={config.type === 'tree' ? 'card' : ''} card={card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} -- Gitblit v1.8.0