fix: 修复ai对话节点下拉选滚轮事件

This commit is contained in:
shaohuzhang1 2024-06-27 17:16:25 +08:00
parent fd944c9b30
commit ee1599874e
2 changed files with 24 additions and 2 deletions

View File

@ -25,6 +25,9 @@
}"
>
<el-select
@wheel="wheel"
@keydown="isKeyDown = true"
@keyup="isKeyDown = false"
:teleported="false"
v-model="chat_data.model_id"
placeholder="请选择 AI 模型"
@ -147,7 +150,15 @@ import { relatedObject } from '@/utils/utils'
import type { Provider } from '@/api/type/model'
const { model } = useStore()
const isKeyDown = ref(false)
const wheel = (e: any) => {
if (isKeyDown.value) {
e.preventDefault()
} else {
e.stopPropagation()
return true
}
}
const {
params: { id }
} = app.config.globalProperties.$route as any

View File

@ -25,6 +25,9 @@
}"
>
<el-select
@wheel="wheel"
@keydown="isKeyDown = true"
@keyup="isKeyDown = false"
:teleported="false"
v-model="form_data.model_id"
placeholder="请选择 AI 模型"
@ -146,7 +149,15 @@ import useStore from '@/stores'
import { relatedObject } from '@/utils/utils'
import type { Provider } from '@/api/type/model'
const { model } = useStore()
const isKeyDown = ref(false)
const wheel = (e: any) => {
if (isKeyDown.value) {
e.preventDefault()
} else {
e.stopPropagation()
return true
}
}
const {
params: { id }
} = app.config.globalProperties.$route as any