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) }