| | |
| | | const NodesWrap = asyncComponent(() => import('./node-wrap')) |
| | | const CardCellComponent = asyncComponent(() => import('../cardcellcomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteController = asyncIconComponent(() => import('@/components/paste')) |
| | | |
| | | class CardBoxComponent extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateElement(_card) |
| | | } |
| | | |
| | | paste = (element, resolve) => { |
| | | const { card } = this.state |
| | | |
| | | let _uuid = Utils.getuuid() |
| | | |
| | | if (element.copyType === 'action') { |
| | | element.eleType = 'button' |
| | | } |
| | | |
| | | element.uuid = _uuid |
| | | element.focus = true |
| | | |
| | | resolve({status: true}) |
| | | |
| | | // 注册事件-添加元素 |
| | | MKEmitter.emit('cardAddElement', card.uuid, element) |
| | | } |
| | | |
| | | render() { |
| | | const { cards } = this.props |
| | | const { card } = this.state |
| | |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> : <NodesWrap card={card} updateMenus={this.updateNodes}/>} |
| | | {cards.type !== 'timeline' ? <CopyComponent type="cardcell" card={card}/> : null} |
| | | <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | {control ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |