From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 11 三月 2023 17:58:54 +0800 Subject: [PATCH] 2023-03-11 --- src/pc/menushell/card.jsx | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index 085daf7..7cdc671 100644 --- a/src/pc/menushell/card.jsx +++ b/src/pc/menushell/card.jsx @@ -31,8 +31,9 @@ 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, updateConfig }) => { +const Card = ({ id, card, moveCard, findCard, delCard, unGroup, updateConfig }) => { const originalIndex = findCard(id).index const [{ isDragging }, drag] = useDrag({ item: { type: 'menu', id, originalIndex }, @@ -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') { @@ -125,7 +113,7 @@ } else if (card.type === 'table' && card.subtype === 'editable') { return (<EditTable card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'group' && card.subtype === 'normalgroup') { - return (<NormalGroup group={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + return (<NormalGroup group={card} updateConfig={updateConfig} unGroup={unGroup} deletecomponent={delCard}/>) } else if (card.type === 'editor') { return (<BraftEditor card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'code') { -- Gitblit v1.8.0