From 9b54e50510e0611499aab2b9d5bb8529f5bc4cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E5=BF=86=E5=A4=A9=E5=A0=82?= <1455668754@qq.com> Date: Wed, 15 Apr 2026 10:01:07 +0800 Subject: [PATCH 01/22] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3vxtable=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8formConfig=E6=97=B6=EF=BC=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=8F=98=E6=9B=B4data=E5=A4=B1=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/effects/plugins/src/vxe-table/use-vxe-grid.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue index 78cab6a58..9be8f334e 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -230,9 +230,9 @@ const options = computed(() => { } if (mergedOptions.formConfig) { mergedOptions.formConfig.enabled = false; - if (tableData.value && tableData.value.length > 0) { - mergedOptions.data = tableData.value; - } + } + if (tableData.value && tableData.value.length > 0) { + mergedOptions.data = tableData.value; } return mergedOptions; }); From c2a85f4ec2b7175ec4bec6600860c2957323c710 Mon Sep 17 00:00:00 2001 From: Harold Zhang Date: Mon, 8 Jun 2026 14:15:31 +0800 Subject: [PATCH 02/22] feat: support unlocking scroll when modal dialog closes --- .../shadcn-ui/src/ui/dialog/DialogContent.vue | 28 +++++------ .../shadcn-ui/src/ui/dialog/DialogOverlay.vue | 47 ++++++++++--------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue index 177482bae..fbfa93c7b 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue @@ -5,9 +5,8 @@ import type { HTMLAttributes } from 'vue'; import type { ClassType } from '@vben-core/typings'; -import { computed, inject, ref } from 'vue'; +import { computed, ref } from 'vue'; -import { useScrollLock } from '@vben-core/composables'; import { cn } from '@vben-core/shared/utils'; import { X } from '@lucide/vue'; @@ -18,6 +17,8 @@ import { useForwardPropsEmits, } from 'reka-ui'; +import DialogOverlay from './DialogOverlay.vue'; + defineOptions({ inheritAttrs: false, }); @@ -73,11 +74,9 @@ const position = computed(() => { return isAppendToBody() ? 'fixed' : 'absolute'; }); -// reka-ui 的 Dialog 在 modal=false 时不会渲染遮罩,这里自行渲染一个遮罩层并锁定滚动, -// 既保留遮罩/滚动锁定能力,又避免 modal=true 时 body 被设置 pointer-events:none 导致 -// 弹出层(如 Select 下拉框)无法点击的问题。 -useScrollLock(); -const dismissableModalId = inject('DISMISSABLE_MODAL_ID', undefined); +// reka-ui 的 Dialog 在 modal=false 时不会渲染遮罩,这里通过 DialogOverlay 组件自行渲染遮罩层并锁定滚动。 +// DialogOverlay 组件通过 v-if 控制挂载/卸载,其内部的 useScrollLock 会在组件卸载时自动解锁滚动, +// 避免 modal=true 时 body 被设置 pointer-events:none 导致弹出层(如 Select 下拉框)无法点击的问题。 const forwarded = useForwardPropsEmits(delegatedProps, emits); @@ -100,18 +99,13 @@ defineExpose({