king
2025-03-24 a8d8d2fdb83f21e76f90cb13ea91ad6e9bf98a9b
src/menu/components/group/groupcomponents/card.jsx
@@ -24,6 +24,10 @@
const CodeSandbox = asyncComponent(() => import('@/menu/components/code/sandbox'))
const CustomChart = asyncComponent(() => import('@/menu/components/chart/chart-custom'))
const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline'))
const AntvG6 = asyncComponent(() => import('@/menu/components/chart/antv-G6'))
const AntvX6 = asyncComponent(() => import('@/menu/components/chart/antv-X6'))
const DoubleDataCard = asyncComponent(() => import('@/menu/components/card/double-data-card'))
const Calendar = asyncComponent(() => import('@/menu/components/calendar'))
const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => {
  const originalIndex = findCard(id).index
@@ -58,6 +62,12 @@
    style = { opacity: 0.3}
  }
  if (card.style && card.style.clear === 'left') {
    style.clear = 'left'
  } else if (card.style && card.style.clear === 'right') {
    style.float = 'right'
  }
  const getCardComponent = () => {
    if (card.type === 'bar' || card.type === 'line') {
      return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard} />)
@@ -79,10 +89,12 @@
      return (<DataCard card={card} updateConfig={updateConfig} deletecomponent={delCard} />)
    } else if (card.type === 'card' && card.subtype === 'propcard') {
      return (<PropCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'table' && card.subtype === 'tablecard') {
    } else if (card.type === 'card' && card.subtype === 'tablecard') {
      return (<TableCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'table' && card.subtype === 'normaltable') {
      return (<NormalTable card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'card' && card.subtype === 'dualdatacard') {
      return (<DoubleDataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'table' && card.subtype === 'editable') {
      return (<EditTable card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'carousel' && card.subtype === 'datacard') {
@@ -99,6 +111,12 @@
      return (<Timeline card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'chart') {
      return (<CustomChart 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 === 'calendar') {
      return (<Calendar card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }