diff --git a/ui/packages/ai/AiCopilot.vue b/ui/packages/ai/AiCopilot.vue index 50404fd2..ff1fdf19 100644 --- a/ui/packages/ai/AiCopilot.vue +++ b/ui/packages/ai/AiCopilot.vue @@ -143,6 +143,9 @@ export default { watch: { currentConversation(v) { v && this.getHistory({conversationId: v}) + }, + loading(v) { + !v && this.$nextTick(() => this.$refs.sendInput.focus()) } }, created() { @@ -192,7 +195,7 @@ export default {
+ @keydown.native="handleHotkey" :disabled="loading" :placeholder="loading?'正在思考中...':'请输入'" ref="sendInput"/>