From 3a5c6747774219696d79a837e819553cba0dea13 Mon Sep 17 00:00:00 2001 From: hujiale <13306077+hujiale9527@user.noreply.gitee.com> Date: Fri, 25 Oct 2024 13:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/dashboard/home/index.vue | 80 +++++++++++-------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/apps/web-test/src/views/dashboard/home/index.vue b/apps/web-test/src/views/dashboard/home/index.vue index 6a10a8f1..2b42ee57 100644 --- a/apps/web-test/src/views/dashboard/home/index.vue +++ b/apps/web-test/src/views/dashboard/home/index.vue @@ -61,6 +61,7 @@ const setComponentRef = (el, id) => { const { proxy, ctx: that } = getCurrentInstance(); const layout = ref([]); + onMounted(() => { const layoutStr = JSON.parse(localStorage.getItem('layout')); if (layoutStr && layoutStr.length > 0) { @@ -72,6 +73,11 @@ onMounted(() => { layout.value = layoutStr; } console.log('oooo', layout.value); + + // 计算分组数量: {workbench:12} + for (const item of groupList) { + item.count = tilesList.filter((item1) => item1.group == item.value).length; + } }); const colNum = 12; let defaultH = 2; @@ -548,7 +554,7 @@ const haveItem = (name) => { }; // 磁贴商店筛选 -const shopFlotter = ref('1'); +const shopFlotter = ref('-1'); // 新建磁贴弹层 const addTilesModal = ref(false); @@ -598,7 +604,11 @@ const formState = reactive({ :h="item.h" :i="item.i" :is-resizable=" - tilesIsMove && item && item.isResize ? item.isResize : false + tilesIsMove && + (item.component.includes('Output2') || + item.component.includes('Output5')) + ? true + : false " :min-h="item.minH" :min-w="item.minW" @@ -663,7 +673,7 @@ const formState = reactive({ @@ -684,38 +694,40 @@ const formState = reactive({
- -
-