From 703047630f56ce22d2fc7729e4c6b146f5d4f44a Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 19 Aug 2024 17:59:22 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8DTab=E9=83=A8=E5=88=86=E6=8B=96=E6=8B=BD?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../data-visualization/canvas/CanvasCore.vue | 18 +-
.../custom-component/de-tabs/Component.vue | 1 +
.../de-tabs/DataVComponent.vue | 523 ------------------
3 files changed, 11 insertions(+), 531 deletions(-)
delete mode 100644 core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue
index a0bc770939..07ea81f995 100644
--- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue
+++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue
@@ -855,14 +855,16 @@ function removeItemById(componentId) {
function removeItem(index) {
let item = componentData.value[index]
if (item && isSameCanvas(item, canvasId.value)) {
- removeItemFromPositionBox(item)
- let belowItems = findBelowItems(item)
- _.forEach(belowItems, function (upItem) {
- let canGoUpRows = canItemGoUp(upItem)
- if (canGoUpRows > 0) {
- moveItemUp(upItem, canGoUpRows)
- }
- })
+ if (isDashboard()) {
+ removeItemFromPositionBox(item)
+ let belowItems = findBelowItems(item)
+ _.forEach(belowItems, function (upItem) {
+ let canGoUpRows = canItemGoUp(upItem)
+ if (canGoUpRows > 0) {
+ moveItemUp(upItem, canGoUpRows)
+ }
+ })
+ }
let checkedFields = []
if (item.innerType === 'VQuery') {
;(item.propValue || []).forEach(ele => {
diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue
index fab42d4736..e77a2c7360 100644
--- a/core/core-frontend/src/custom-component/de-tabs/Component.vue
+++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue
@@ -301,6 +301,7 @@ const componentMoveIn = component => {
dvMainStore.setCurComponent({ component: null, index: null })
component.canvasId = element.value.id + '--' + tabItem.name
dataVTabComponentAdd(component, element.value.style)
+ tabItem.componentData.push(component)
}
}
})
diff --git a/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue b/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
deleted file mode 100644
index f4faa5e5f3..0000000000
--- a/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
+++ /dev/null
@@ -1,523 +0,0 @@
-
-
-
-
-
-
- {{ tabItem.title }}
-
-
-
-
-
-
-
- 编辑标题
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-