fix(Data source ): repeatedly retrieves schema

This commit is contained in:
dataeaseShu
2025-10-30 11:38:34 +08:00
committed by dataeaseShu
parent 5f49187ffe
commit 3c46d46a4f
+3 -6
View File
@@ -341,16 +341,13 @@ const check = () => {
}
})
}
const getSchema = () => {
const getSchema = debounce(() => {
schemaList.value = []
const requestObj = buildConf()
datasourceApi.getSchema(requestObj).then((res: any) => {
for (let item of res) {
schemaList.value.push({ label: item, value: item })
}
schemaList.value = (res || []).map((item: any) => ({ label: item, value: item }))
})
}
}, 300)
onBeforeUnmount(() => (saveLoading.value = false))