mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix(Data source ): repeatedly retrieves schema
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user