| | |
| | | import './index.scss' |
| | | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting')) |
| | | // const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting')) |
| | | const SearchComponent = asyncComponent(() => import('@/menu/searchcomponent')) |
| | | const CardComponent = asyncComponent(() => import('./cardcomponent')) |
| | | |
| | | const { confirm } = Modal |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { menu } = this.props |
| | | const { card } = this.state |
| | | |
| | | return ( |
| | |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> |
| | | <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> |
| | | {menu ? <WrapComponent config={card} sysRoles={menu.sysRoles} MenuType={menu.MenuType} updateConfig={this.updateComponent} /> : null} |
| | | {/* {menu ? <WrapComponent config={card} sysRoles={menu.sysRoles} MenuType={menu.MenuType} updateConfig={this.updateComponent} /> : null} */} |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} MenuType={menu ? menu.MenuType : ''} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | | ) |
| | | } |