From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/pc/menushell/card.jsx | 24 +++++++----------------- 1 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx index 085daf7..037187a 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 }, @@ -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') { @@ -125,7 +115,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