Commit ec9da121 authored by chenghong_tao's avatar chenghong_tao

Add suggestion question loading status not click

parent 1e413c8d
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<template v-if="suggestedQuestions.length > 0"> <template v-if="suggestedQuestions.length > 0">
<el-divider style="margin: 6px 0;"/> <el-divider style="margin: 6px 0;"/>
<template v-for="(item, index) in suggestedQuestions" :key="'suggest' + index"> <template v-for="(item, index) in suggestedQuestions" :key="'suggest' + index">
<el-link type="primary" @click="handleQuery(item)">{{ item }}</el-link><br> <el-link type="primary" @click="handleQuery(item)" :disabled="taskStore.isLoading">{{ item }}</el-link><br>
</template> </template>
</template> </template>
</div> </div>
...@@ -21,7 +21,9 @@ import { computed, ref, watch } from "vue"; ...@@ -21,7 +21,9 @@ import { computed, ref, watch } from "vue";
import { Refresh, Search, Star, DocumentCopy } from "@element-plus/icons-vue"; import { Refresh, Search, Star, DocumentCopy } from "@element-plus/icons-vue";
import { Bubble } from "vue-element-plus-x"; import { Bubble } from "vue-element-plus-x";
import difyApi from "../../apis/difyApi"; import difyApi from "../../apis/difyApi";
import { useTaskStore } from "../../store/task";
const taskStore = useTaskStore()
const avatarAi = "./avatarAI.svg"; const avatarAi = "./avatarAI.svg";
const props = defineProps({ const props = defineProps({
appParams: { appParams: {
...@@ -41,7 +43,10 @@ watch(() => props.appParams, (val) => { ...@@ -41,7 +43,10 @@ watch(() => props.appParams, (val) => {
const emit = defineEmits(["userQuery"]); const emit = defineEmits(["userQuery"]);
const handleQuery = (query) => { const handleQuery = (query) => {
if (taskStore.isLoading) {
return
}
emit("userQuery", query) emit("userQuery", query)
} }
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment