From afb39f8ab004b2607bb718edab02e99c7a010114 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 22 三月 2023 14:36:44 +0800 Subject: [PATCH] 2023-03-22 --- src/pc/menushell/card.jsx | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index c0bf99b..7cdc671 100644 --- a/src/pc/menushell/card.jsx +++ b/src/pc/menushell/card.jsx @@ -31,6 +31,7 @@ const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline')) const AntvG6 = asyncComponent(() => import('@/menu/components/chart/antv-G6')) const Iframe = asyncComponent(() => import('@/menu/components/iframe')) +const DoubleDataCard = asyncComponent(() => import('@/menu/components/card/double-data-card')) const Card = ({ id, card, moveCard, findCard, delCard, unGroup, updateConfig }) => { const originalIndex = findCard(id).index @@ -71,21 +72,6 @@ } let col = ' ant-col ant-col-' + (card.width || 24) - if (card.type === 'login') { - let height = '' - if (card.wrap && card.wrap.height) { - // scaleview - height = card.wrap.height.replace(/\d+vw/ig, (word) => { - return parseFloat(word) * (window.GLOB.winWidth || 420) / 100 + 'px' - // return parseFloat(word) * 350 / 100 + 'px' - }).replace(/\d+vh/ig, (word) => { - return parseFloat(word) * (window.GLOB.winHeight || 738) / 100 + 'px' - // return parseFloat(word) * 615 / 100 + 'px' - }) - } - - style.minHeight = height - } const getCardComponent = () => { if (card.type === 'bar' || card.type === 'line') { @@ -114,6 +100,8 @@ 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 === 'card' && card.subtype === 'dualdatacard') { + return (<DoubleDataCard 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') { -- Gitblit v1.8.0