From c7aece35a62b6e91fd98a625bf0e53f64bfbd18d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 17 八月 2023 16:22:15 +0800 Subject: [PATCH] 2023-08-17 --- src/mob/mobshell/card.jsx | 33 +++++++++++++++++++-------------- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/mob/mobshell/card.jsx b/src/mob/mobshell/card.jsx index f7965f6..ca91322 100644 --- a/src/mob/mobshell/card.jsx +++ b/src/mob/mobshell/card.jsx @@ -32,6 +32,7 @@ const OfficialAccount = asyncComponent(() => import('@/mob/components/official')) const ShareCode = asyncComponent(() => import('@/mob/components/sharecode')) 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 @@ -69,24 +70,26 @@ 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-' + (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' - }) - } + // 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 - } + // style.minHeight = height + // } const getCardComponent = () => { if (card.type === 'bar' || card.type === 'line') { @@ -111,6 +114,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