From bebeca442cee4b83de0d00df29a6514b3f723c4f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 28 七月 2021 13:41:06 +0800 Subject: [PATCH] 2021-07-28 --- src/pc/menushell/card.jsx | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index 519ea30..c3311f6 100644 --- a/src/pc/menushell/card.jsx +++ b/src/pc/menushell/card.jsx @@ -12,6 +12,7 @@ const AntvTabs = asyncComponent(() => import('@/menu/components/tabs/antv-tabs')) const DataCard = asyncComponent(() => import('@/menu/components/card/data-card')) const PropCard = asyncComponent(() => import('@/menu/components/card/prop-card')) +const NormalTree = asyncComponent(() => import('@/menu/components/tree/antd-tree')) const TableCard = asyncComponent(() => import('@/menu/components/card/table-card')) const NormalTable = asyncComponent(() => import('@/menu/components/table/normal-table')) const NormalGroup = asyncComponent(() => import('@/menu/components/group/normal-group')) @@ -22,6 +23,7 @@ const NormalLogin = asyncComponent(() => import('@/pc/components/login/normal-login')) const CarouselDataCard = asyncComponent(() => import('@/menu/components/carousel/data-card')) const CarouselPropCard = asyncComponent(() => import('@/menu/components/carousel/prop-card')) +const Balcony = asyncComponent(() => import('@/menu/components/card/balcony')) const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => { const originalIndex = findCard(id).index @@ -61,10 +63,10 @@ if (card.wrap && card.wrap.height) { // scaleview height = card.wrap.height.replace(/\d+vw/ig, (word) => { - return parseFloat(word) * 420 / 100 + 'px' + return parseFloat(word) * (window.GLOB.winWidth || 420) / 100 + 'px' // return parseFloat(word) * 350 / 100 + 'px' }).replace(/\d+vh/ig, (word) => { - return parseFloat(word) * 738 / 100 + 'px' + return parseFloat(word) * (window.GLOB.winHeight || 738) / 100 + 'px' // return parseFloat(word) * 615 / 100 + 'px' }) } @@ -85,6 +87,8 @@ return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'dashboard') { return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + } else if (card.type === 'tree') { + return (<NormalTree card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'scatter') { return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'tabs') { @@ -109,6 +113,8 @@ return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'login') { return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + } else if (card.type === 'balcony') { + return (<Balcony card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } } -- Gitblit v1.8.0