Commit eb7e85e7 authored by chenghong_tao's avatar chenghong_tao

增加loading状态

parent c147ba53
......@@ -38,7 +38,7 @@
:icon="Refresh"
size="small"
circle
:disabled="isLoading"
:disabled="taskStore.isLoading"
@click="reStartSSE"
/>
<el-button
......@@ -112,6 +112,11 @@ watch(
{ immediate: true }
);
watch(() => isLoading.value, (newValue) => {
console.log('isLoading status : ', newValue)
taskStore.setIsLoading(newValue)
})
const isReStartWorkflow = ref(false)
const workflowStatus = ref(null)
// 默认支持 SSE 协议
......
......@@ -6,7 +6,8 @@ export const useTaskStore = defineStore('task', {
taskId: '', // 当前任务id
conversation_id: '', // 当前会话id
message_id: '', // 当前消息id
workflow_run_id: '' // 当前工作流运行id
workflow_run_id: '', // 当前工作流运行id
isLoading: false
}
},
actions: {
......@@ -24,6 +25,9 @@ export const useTaskStore = defineStore('task', {
setWorkflowRunId (workflow_run_id) {
this.workflow_run_id = workflow_run_id
},
setIsLoading(isLoading) {
this.isLoading = isLoading
},
clear () {
this.taskId = ''
this.conversation_id = ''
......
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