From 7e08124f7727021b30ca1273577c19ebc15f3056 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 7 Aug 2024 15:56:20 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E6=B8=85=E7=90=86=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E9=9B=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../editor/dataset-select/DatasetSelect.vue | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/core/core-frontend/src/views/chart/components/editor/dataset-select/DatasetSelect.vue b/core/core-frontend/src/views/chart/components/editor/dataset-select/DatasetSelect.vue
index fc64608a80..10c1a3383d 100644
--- a/core/core-frontend/src/views/chart/components/editor/dataset-select/DatasetSelect.vue
+++ b/core/core-frontend/src/views/chart/components/editor/dataset-select/DatasetSelect.vue
@@ -10,6 +10,8 @@ import { ElFormItem, FormInstance } from 'element-plus-secondary'
import { useEmitt } from '@/hooks/web/useEmitt'
import { useCache } from '@/hooks/web/useCache'
import { useUserStoreWithOut } from '@/store/modules/user'
+import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
+const dvMainStore = dvMainStoreWithOut()
const { wsCache } = useCache('localStorage')
const userStore = useUserStoreWithOut()
@@ -200,6 +202,20 @@ function onPopoverHide() {
function getNode(nodeId: number) {
return datasetSelector?.value?.getNode(nodeId)
}
+
+const clearShow = computed(
+ () =>
+ props.sourceType === 'dataset' &&
+ dvMainStore.curComponent &&
+ dvMainStore.curComponent.innerType === 'rich-text'
+)
+
+const handleClear = e => {
+ e.preventDefault()
+ e.stopPropagation()
+ dsClick({ leaf: true, id: null } as Tree)
+}
+
const handleFocus = () => {
if (
props.sourceType === 'dataset' &&
@@ -246,7 +262,6 @@ onMounted(() => {
size="middle"
:effect="themes"
v-model="selectedNodeName"
- readonly
class="data-set-dark"
@focus="handleFocus"
:placeholder="'请选择' + sourceName"
@@ -255,6 +270,9 @@ onMounted(() => {
+
+
+
@@ -367,6 +385,9 @@ onMounted(() => {