forked from github/dataease
fix(系统设置): MAC电脑上,中文输入模式下,在Copilot对话中输入英文然后回车,会直接发送对话,而不是将英文输入到对话框
This commit is contained in:
parent
9e5c6305ee
commit
9563e3ddfe
@ -655,14 +655,14 @@ export const stepsColor = (start, end, steps, gamma) => {
|
||||
function parseColor(hexStr) {
|
||||
return hexStr.length === 4
|
||||
? hexStr
|
||||
.substr(1)
|
||||
.split('')
|
||||
.map(function (s) {
|
||||
return 0x11 * parseInt(s, 16)
|
||||
})
|
||||
.substr(1)
|
||||
.split('')
|
||||
.map(function (s) {
|
||||
return 0x11 * parseInt(s, 16)
|
||||
})
|
||||
: [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) {
|
||||
return parseInt(s, 16)
|
||||
})
|
||||
return parseInt(s, 16)
|
||||
})
|
||||
}
|
||||
function pad(s) {
|
||||
return s.length === 1 ? '0' + s : s
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user