| | |
| | | |
| | | const CardCellComponent = asyncComponent(() => import('../cardcellcomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteComponent = asyncIconComponent(() => import('./pastecomponent')) |
| | | |
| | | class CardBoxComponent extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateElement(_card) |
| | | } |
| | | |
| | | updateCard = (elements) => { |
| | | updateCard = (elements, type) => { |
| | | const { card, side } = this.state |
| | | |
| | | let _card = {} |
| | |
| | | _card = {...card, elements: elements} |
| | | } |
| | | |
| | | this.setState({ |
| | | card: _card |
| | | }) |
| | | if (type === 'paste') { |
| | | this.setState({ |
| | | card: _card, |
| | | elements: fromJS(elements).toJS() |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | card: _card |
| | | }) |
| | | } |
| | | |
| | | this.props.updateElement(_card) |
| | | } |
| | |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => this.setState({settingVisible: true})} /> |
| | | <CopyComponent type="cardcell" card={card}/> |
| | | <PasteComponent elements={elements} options={['action', 'customCardElement']} updateConfig={(list) => this.updateCard(list, 'paste')} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | {cards.subtype === 'propcard' ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |