Skip to content

Commit 40edcde

Browse files
fix: chat share
1 parent d32aa49 commit 40edcde

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
</span>
139139
<span class="ml-8">
140140
<el-tooltip effect="dark" :content="$t('chat.share')" placement="top">
141-
<el-button text @click.stop="clickShareHandle(props.data.record_id)">
141+
<el-button text @click.stop="clickShareHandle(props.data.record_id)" :disabled="chat_loading">
142142
<AppIcon class="color-secondary" iconName="app-share"></AppIcon>
143143
</el-button>
144144
</el-tooltip>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ watch(
877877
878878
defineExpose({
879879
setScrollBottom,
880+
loading,
880881
})
881882
</script>
882883
<style lang="scss">

ui/src/views/chat/component/HistoryPanel.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<el-dropdown-menu>
8989
<el-dropdown-item
9090
@click.stop="shareHandle()"
91-
:disabled="currentChatId !== row.id"
91+
:disabled="currentChatId !== row.id && chat_loading"
9292
>
9393
<AppIcon iconName="app-share" class="color-secondary"></AppIcon>
9494
{{ $t('chat.share') }}
@@ -225,6 +225,7 @@ const props = defineProps<{
225225
leftLoading?: boolean
226226
currentChatId: string
227227
isPcCollapse?: boolean
228+
chat_loading?: boolean
228229
}>()
229230
const emit = defineEmits([
230231
'newChat',

ui/src/views/chat/pc/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
@refreshFieldTitle="refreshFieldTitle"
3434
@clickShare="clickShareHandle"
3535
:isPcCollapse="isPcCollapse"
36+
:chat-loading="AiChatRef?.loading"
3637
>
3738
<div class="user-info p-16 cursor">
3839
<el-avatar
@@ -126,7 +127,12 @@
126127
{{ paginationConfig.total }} {{ $t('chat.question_count') }}
127128
</span>
128129
<el-tooltip effect="dark" :content="$t('chat.share')" placement="top">
129-
<el-button text class="ml-12" @click="clickShareHandle">
130+
<el-button
131+
text
132+
class="ml-12"
133+
@click="clickShareHandle"
134+
:disabled="AiChatRef?.loading"
135+
>
130136
<AppIcon iconName="app-share"></AppIcon>
131137
</el-button>
132138
</el-tooltip>

0 commit comments

Comments
 (0)