From 182445f68ca03beb95a90e57867f356fe155126b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 13 十一月 2021 21:14:23 +0800
Subject: [PATCH] 2021-11-13

---
 src/menu/menushell/card.jsx |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/menu/menushell/card.jsx b/src/menu/menushell/card.jsx
index 6f30721..83cfc00 100644
--- a/src/menu/menushell/card.jsx
+++ b/src/menu/menushell/card.jsx
@@ -25,6 +25,7 @@
 const BraftEditor = asyncComponent(() => import('@/menu/components/editor/braft-editor'))
 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 Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => {
   const originalIndex = findCard(id).index
@@ -60,7 +61,11 @@
   }
 
   const getCardComponent = () => {
-    if (card.type === 'bar' || card.type === 'line') {
+    if (card.type === 'card' && card.subtype === 'datacard') {
+      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 === 'bar' || card.type === 'line') {
       return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'search') {
       return (<MainSearch card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
@@ -78,10 +83,6 @@
       return (<TabForm card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'tabs') {
       return (<AntvTabs tabs={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
-    } else if (card.type === 'card' && card.subtype === 'datacard') {
-      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 === 'carousel' && card.subtype === 'datacard') {
       return (<CarouselDataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'carousel' && card.subtype === 'propcard') {
@@ -100,6 +101,8 @@
       return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'balcony') {
       return (<Balcony card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
+    } else if (card.type === 'timeline') {
+      return (<Timeline card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'chart') {
       return (<CustomChart card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     }

--
Gitblit v1.8.0