From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 12 十二月 2023 21:05:37 +0800 Subject: [PATCH] 2023-12-12 --- src/pc/menushell/card.jsx | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index c0bf99b..037187a 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 @@ -68,24 +69,11 @@ if (card.style && card.style.clear === 'left') { style.clear = 'left' + } else if (card.style && card.style.clear === 'right') { + style.float = 'right' } 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 +102,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