Skip to content

Commit 5fbdee8

Browse files
authored
fix: 修复当前正在回答问题时可以点击换个答案 (#573)
1 parent d81bc99 commit 5fbdee8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ui/src/components/ai-chat/OperationButton.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</div>
77
<div>
88
<el-tooltip effect="dark" content="换个答案" placement="top">
9-
<el-button text @click="regeneration">
9+
<el-button :disabled="chat_loading" text @click="regeneration">
1010
<AppIcon iconName="VideoPlay"></AppIcon>
1111
</el-button>
1212
</el-tooltip>
@@ -78,6 +78,9 @@ const props = defineProps({
7878
type: String,
7979
default: ''
8080
},
81+
chat_loading: {
82+
type: Boolean
83+
},
8184
log: Boolean
8285
})
8386

ui/src/components/ai-chat/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
:data="item"
132132
:applicationId="appId"
133133
:chatId="chartOpenId"
134+
:chat_loading="loading"
134135
@regeneration="regenerationChart(item)"
135136
/>
136137
</div>
@@ -541,7 +542,9 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
541542
542543
function regenerationChart(item: chatType) {
543544
inputValue.value = item.problem_text
544-
chatMessage(null, '', true)
545+
if (!loading.value) {
546+
chatMessage(null, '', true)
547+
}
545548
}
546549
547550
function getSourceDetail(row: any) {

0 commit comments

Comments
 (0)