Skip to content

Commit

Permalink
fix: 修复当前正在回答问题时可以点击换个答案 (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 authored May 28, 2024
1 parent d81bc99 commit 5fbdee8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ui/src/components/ai-chat/OperationButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<div>
<el-tooltip effect="dark" content="换个答案" placement="top">
<el-button text @click="regeneration">
<el-button :disabled="chat_loading" text @click="regeneration">
<AppIcon iconName="VideoPlay"></AppIcon>
</el-button>
</el-tooltip>
Expand Down Expand Up @@ -78,6 +78,9 @@ const props = defineProps({
type: String,
default: ''
},
chat_loading: {
type: Boolean
},
log: Boolean
})
Expand Down
5 changes: 4 additions & 1 deletion ui/src/components/ai-chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
:data="item"
:applicationId="appId"
:chatId="chartOpenId"
:chat_loading="loading"
@regeneration="regenerationChart(item)"
/>
</div>
Expand Down Expand Up @@ -541,7 +542,9 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
function regenerationChart(item: chatType) {
inputValue.value = item.problem_text
chatMessage(null, '', true)
if (!loading.value) {
chatMessage(null, '', true)
}
}
function getSourceDetail(row: any) {
Expand Down

0 comments on commit 5fbdee8

Please sign in to comment.