From f497f734966504bd8a7e98bf602da582a53d91e5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 12 九月 2021 02:55:59 +0800 Subject: [PATCH] 2021-09-12 --- src/menu/components/card/cardsimplecomponent/index.jsx | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/menu/components/card/cardsimplecomponent/index.jsx b/src/menu/components/card/cardsimplecomponent/index.jsx index cdda53a..ab3fc00 100644 --- a/src/menu/components/card/cardsimplecomponent/index.jsx +++ b/src/menu/components/card/cardsimplecomponent/index.jsx @@ -134,12 +134,21 @@ getSettingForms = () => { const { cards } = this.props - const { setting } = this.state.card + const { card } = this.state if (cards.type !== 'carousel') { - return getTableSetting(setting, cards.columns) + let buttons = [] + card.elements && card.elements.forEach(item => { + if (item.eleType === 'button') { + buttons.push({ + value: item.uuid, + label: item.label + }) + } + }) + return getTableSetting(card.setting, cards.columns, buttons) } else { - return getCarouselSetting(setting, cards.subtype === 'propcard') + return getCarouselSetting(card.setting, cards.subtype === 'propcard') } } @@ -173,7 +182,7 @@ <div className="mk-popover-control"> <Icon className="plus" title="娣诲姞鍏冪礌" onClick={this.addElement} type="plus" /> <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" /> - <NormalForm title="鍗$墖璁剧疆" width={700} update={this.updateSetting} getForms={this.getSettingForms}> + <NormalForm title="鍗$墖璁剧疆" width={800} update={this.updateSetting} getForms={this.getSettingForms}> <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="cardcell" card={card}/> -- Gitblit v1.8.0