| | |
| | | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/components/paste')) |
| | | const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent')) |
| | |
| | | MKEmitter.emit('addButton', card.uuid, newcard) |
| | | } |
| | | |
| | | pasteComponent = (res, resolve) => { |
| | | if (res.style) { |
| | | delete res.style.width |
| | | delete res.style.float |
| | | } |
| | | |
| | | res.Ot = res.Ot === 'requiredSgl' ? 'requiredSgl' : 'notRequired' |
| | | |
| | | resolve({status: true}) |
| | | |
| | | res.uuid = Utils.getuuid() |
| | | this.addButton(res) |
| | | } |
| | | |
| | | setSubConfig = (item) => { |
| | | const { card, appType } = this.state |
| | | let btn = fromJS(item).toJS() |
| | |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="tree" card={card}/> |
| | | <PasteComponent options={['action']} updateConfig={this.pasteComponent} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |