From 09bcaefbc2df0719ab07ff87c49ef098e70bac84 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 24 Jun 2025 11:06:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=BA=90):=20=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=95=B0=E6=8D=AE=E6=BA=90=E7=9B=B4=E6=8E=A5=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visualized/data/datasource/form/EditorDetail.vue | 8 +++++++- .../visualized/data/datasource/form/ExcelRemoteDetail.vue | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue index c1508b45ef..a61eedf75a 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue @@ -141,7 +141,7 @@ const defaultApiItem = { useJsonPath: false, jsonPath: '' } - +let time const initForm = (type, pluginDsList, indexPlugin, isPluginDs) => { pluginDs.value = pluginDsList pluginIndex.value = indexPlugin @@ -183,6 +183,12 @@ const initForm = (type, pluginDsList, indexPlugin, isPluginDs) => { form.value.configuration.connectionType = 'sid' } form.value.type = type + + time = setTimeout(() => { + clearTimeout(time) + dsApiForm.value && dsApiForm.value.clearValidate() + dsForm.value && dsForm.value.clearValidate() + }, 0) } const notapiexcelconfig = computed(() => form.value && !form.value.type.startsWith('API')) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue index 2526029ed4..31721e1f56 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue @@ -137,7 +137,7 @@ const defaultRule = { const rule = ref(cloneDeep(defaultRule)) const activeTab = ref('') - +let time const initForm = type => { form.value.configuration = { url: '', @@ -156,7 +156,8 @@ const initForm = type => { } form.value.type = type - setTimeout(() => { + time = setTimeout(() => { + clearTimeout(time) remoteExcelForm.value.clearValidate() }, 0) }