From 57f4dede6b41e3190b785398dbdb868537025760 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 30 Jul 2025 12:30:12 +0800 Subject: [PATCH] fix: tab add component --- frontend/src/views/dashboard/components/component-list.ts | 2 +- frontend/src/views/dashboard/components/sq-tab/index.vue | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/dashboard/components/component-list.ts b/frontend/src/views/dashboard/components/component-list.ts index 24e29e10..43264c20 100644 --- a/frontend/src/views/dashboard/components/component-list.ts +++ b/frontend/src/views/dashboard/components/component-list.ts @@ -27,7 +27,7 @@ const COMPONENT_LIST = [ collisionActive: false, moveInActive: false, moveOutActive: false, - activeTabName: 'tab', + activeTabName: null, propValue: [ { name: 'tab', diff --git a/frontend/src/views/dashboard/components/sq-tab/index.vue b/frontend/src/views/dashboard/components/sq-tab/index.vue index 79cbfeb6..6085c3be 100644 --- a/frontend/src/views/dashboard/components/sq-tab/index.vue +++ b/frontend/src/views/dashboard/components/sq-tab/index.vue @@ -161,9 +161,8 @@ const titleStyle = (itemName: string) => { onMounted(() => { currentInstance = getCurrentInstance() - if (configItem.value.propValue.length > 0) { + if (configItem.value.propValue.length > 0 && !configItem.value.activeTabName) { configItem.value.activeTabName = configItem.value.propValue[0].name - console.log('test1') } })