From 470fd43b4994e8fc4c3cc51b22b859fd430a916e Mon Sep 17 00:00:00 2001 From: wyc001122 <498040880@qq.com> Date: Mon, 2 Jun 2025 08:16:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8useV?= =?UTF-8?q?benVxeGrid=E9=85=8D=E7=BD=AEhasEmptyText=E3=80=81hasEmptyRender?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=20(#6310?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../effects/plugins/src/vxe-table/use-vxe-grid.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 72fbb07a..f3eb6735 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -278,6 +278,15 @@ const delegatedFormSlots = computed(() => { return resultSlots.map((key) => key.replace(FORM_SLOT_PREFIX, '')); }); +const showDefaultEmpty = computed(() => { + // 检查是否有原生的 VXE Table 空状态配置 + const hasEmptyText = options.value.emptyText !== undefined; + const hasEmptyRender = options.value.emptyRender !== undefined; + + // 如果有原生配置,就不显示默认的空状态 + return !hasEmptyText && !hasEmptyRender; +}); + async function init() { await nextTick(); const globalGridConfig = VxeUI?.getConfig()?.grid ?? {}; @@ -459,7 +468,7 @@ onUnmounted(() => { -