| | |
| | | |
| | | 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') |
| | | } |
| | | } |
| | | |
| | |
| | | <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}/> |