Skip to content

feat: 【应用编排】修复选择器滚动条问题 #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion ui/src/workflow/common/NodeCascader.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<el-cascader
@wheel="wheel"
@keydown="isKeyDown = true"
@keyup="isKeyDown = false"
:teleported="false"
:options="options"
@visible-change="visibleChange"
Expand All @@ -8,7 +11,12 @@
separator=" > "
>
<template #default="{ node, data }">
<span class="flex align-center">
<span
class="flex align-center"
@wheel="wheel"
@keydown="isKeyDown = true"
@keyup="isKeyDown = false"
>
<component :is="iconComponent(`${data.type}-icon`)" class="mr-8" :size="18" />{{
data.label
}}</span
Expand All @@ -34,6 +42,15 @@ const data = computed({
}
})
const options = ref<Array<any>>([])
const isKeyDown = ref(false)
const wheel = (e: any) => {
if (isKeyDown.value) {
e.preventDefault()
} else {
e.stopPropagation()
return true
}
}

function visibleChange(bool: boolean) {
if (bool) {
Expand Down
Loading