fix(数据源): 创建数据源直接触发校验

This commit is contained in:
dataeaseShu
2025-06-24 11:06:56 +08:00
committed by xuwei-fit2cloud
parent 0be6c2773d
commit 09bcaefbc2
2 changed files with 10 additions and 3 deletions

View File

@@ -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'))

View File

@@ -137,7 +137,7 @@ const defaultRule = {
const rule = ref<FormRules>(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)
}