From 1f99e5da897fa4a04de439665d16c86ebf0bc63a Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Fri, 16 Aug 2024 18:03:19 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E6=94=AF=E6=8C=81Tab?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6#9449?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../data-visualization/canvas/DePreview.vue | 2 +
.../custom-component/de-tabs/Component.vue | 6 +
.../de-tabs/DataVComponent.vue | 523 ++++++++++++++++++
core/core-frontend/src/utils/style.ts | 2 +-
4 files changed, 532 insertions(+), 1 deletion(-)
create mode 100644 core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
diff --git a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue
index c91794bc34..ffe8c2da76 100644
--- a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue
+++ b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue
@@ -21,6 +21,7 @@ const dvMainStore = dvMainStoreWithOut()
const { pcMatrixCount, curComponent, mobileInPc, canvasState } = storeToRefs(dvMainStore)
const openHandler = ref(null)
const customDatasetParamsRef = ref(null)
+const emits = defineEmits(['onResetLayout'])
const props = defineProps({
canvasStyleData: {
@@ -213,6 +214,7 @@ const resetLayout = () => {
scaleMinHeight
)
}
+ emits('onResetLayout')
}
})
}
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 f4faa5e5f3..fab42d4736 100644
--- a/core/core-frontend/src/custom-component/de-tabs/Component.vue
+++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue
@@ -394,6 +394,12 @@ const borderActiveColor = computed(() => {
}
})
+const onResetLayout = () => {
+ if (!isDashboard()) {
+ groupSizeStyleAdaptor(element.value)
+ }
+}
+
const titleValid = computed(() => {
return !!state.textarea && !!state.textarea.trim()
})
diff --git a/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue b/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
new file mode 100644
index 0000000000..f4faa5e5f3
--- /dev/null
+++ b/core/core-frontend/src/custom-component/de-tabs/DataVComponent.vue
@@ -0,0 +1,523 @@
+
+
+
+
+
+
+ {{ tabItem.title }}
+
+
+
+
+
+
+
+ 编辑标题
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/utils/style.ts b/core/core-frontend/src/utils/style.ts
index df7666d31b..dfd6e8b59a 100644
--- a/core/core-frontend/src/utils/style.ts
+++ b/core/core-frontend/src/utils/style.ts
@@ -239,9 +239,9 @@ export function createGroupStyle(groupComponent) {
function dataVTabSizeStyleAdaptor(tabComponent) {
const parentStyleAdaptor = { ...tabComponent.style }
parentStyleAdaptor.height = parentStyleAdaptor.height - 48
+ console.log('canvasId=tabs' + JSON.stringify(parentStyleAdaptor))
tabComponent.propValue.forEach(tabItem => {
tabItem.componentData.forEach(tabComponent => {
- tabComponent.linkageFilters = []
groupItemStyleAdaptor(tabComponent, parentStyleAdaptor)
})
})