| | |
| | | const Account = asyncComponent(() => import('@/menu/components/module/account')) |
| | | const Iframe = asyncComponent(() => import('@/menu/components/iframe')) |
| | | const AntvG6 = asyncComponent(() => import('@/menu/components/chart/antv-G6')) |
| | | const AntvX6 = asyncComponent(() => import('@/menu/components/chart/antv-X6')) |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, delCard, unGroup, updateConfig }) => { |
| | | const originalIndex = findCard(id).index |
| | |
| | | return (<Iframe card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'antvG6') { |
| | | return (<AntvG6 card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'antvX6') { |
| | | return (<AntvX6 card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'module' && card.subtype === 'voucher') { |
| | | return (<Voucher card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'module' && card.subtype === 'account') { |
| | | return (<Account card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } |
| | | } |
| | | |
| | | // if (card.type === 'antvX6') { // 测试 |
| | | // return ( |
| | | // <div className={'ant-col mk-component-card ant-col-' + (card.width || 24)} style={style}> |
| | | // <AntvX6 card={card} updateConfig={updateConfig} deletecomponent={delCard}/> |
| | | // </div> |
| | | // ) |
| | | // } |
| | | |
| | | return ( |
| | | <div className={'ant-col mk-component-card ant-col-' + (card.width || 24)} ref={node => drag(drop(node))} style={style}> |
| | | {getCardComponent()} |