Merge pull request #11145 from dataease/pr@dev-v2_st

fix(系统设置): MAC电脑上,中文输入模式下,在Copilot对话中输入英文然后回车,会直接发送对话,而不是将英文输入到对话框
This commit is contained in:
dataeaseShu 2024-07-24 14:08:49 +08:00 committed by GitHub
commit c8883f9233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 8 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { ref, shallowRef, computed, watch, onBeforeUnmount, nextTick } from 'vue'
import { ref, shallowRef, computed, watch, nextTick } from 'vue'
import { ElMessageBox } from 'element-plus-secondary'
import {
getDatasetTree,
@ -152,6 +152,10 @@ const handleShowLeft = val => {
const copilotChatLoading = ref(false)
const inputRef = ref()
const queryAnswer = (event?: KeyboardEvent) => {
if (event?.keyCode === 229) {
return
}
if (event?.keyCode === 13) {
event.preventDefault()
}