king
2024-04-18 8f78c97ffcde201e2a4d1ffa7ccb97a13f0f045d
src/menu/menushell/card.jsx
@@ -30,9 +30,11 @@
const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline'))
const Voucher = asyncComponent(() => import('@/menu/components/module/voucher'))
const Account = asyncComponent(() => import('@/menu/components/module/account'))
const Invoice = asyncComponent(() => import('@/menu/components/module/invoice'))
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 Calendar = asyncComponent(() => import('@/menu/components/calendar'))
const Card = ({ id, card, moveCard, findCard, delCard, unGroup, updateConfig }) => {
  const originalIndex = findCard(id).index
@@ -69,6 +71,8 @@
  if (card.style && card.style.clear === 'left') {
    style.clear = 'left'
  } else if (card.style && card.style.clear === 'right') {
    style.float = 'right'
  }
  const getCardComponent = () => {
@@ -126,19 +130,15 @@
      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 === 'calendar') {
      return (<Calendar 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}/>)
    } else if (card.type === 'module' && card.subtype === 'invoice') {
      return (<Invoice 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 (