diff --git a/frontend/src/views/chat/ChatCreator.vue b/frontend/src/views/chat/ChatCreator.vue index f53ea62e..02769f97 100644 --- a/frontend/src/views/chat/ChatCreator.vue +++ b/frontend/src/views/chat/ChatCreator.vue @@ -51,6 +51,7 @@ function listDs() { const innerDs = ref() const loading = ref(false) +const statusLoading = ref(false) function showDs() { listDs() @@ -68,12 +69,18 @@ function selectDsInDialog(ds: any) { function confirmSelectDs() { if (innerDs.value) { + statusLoading.value = true //check first - datasourceApi.check_by_id(innerDs.value).then((res: any) => { - if (res) { - createChat(innerDs.value) - } - }) + datasourceApi + .check_by_id(innerDs.value) + .then((res: any) => { + if (res) { + createChat(innerDs.value) + } + }) + .finally(() => { + statusLoading.value = false + }) } } @@ -117,98 +124,100 @@ defineExpose({