File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/effects/plugins/src/vxe-table Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,15 @@ const delegatedFormSlots = computed(() => {
278
278
return resultSlots .map ((key ) => key .replace (FORM_SLOT_PREFIX , ' ' ));
279
279
});
280
280
281
+ const showDefaultEmpty = computed (() => {
282
+ // 检查是否有原生的 VXE Table 空状态配置
283
+ const hasEmptyText = options .value .emptyText !== undefined ;
284
+ const hasEmptyRender = options .value .emptyRender !== undefined ;
285
+
286
+ // 如果有原生配置,就不显示默认的空状态
287
+ return ! hasEmptyText && ! hasEmptyRender ;
288
+ });
289
+
281
290
async function init() {
282
291
await nextTick ();
283
292
const globalGridConfig = VxeUI ?.getConfig ()?.grid ?? {};
@@ -459,7 +468,7 @@ onUnmounted(() => {
459
468
</slot >
460
469
</template >
461
470
<!-- 统一控状态 -->
462
- <template #empty >
471
+ <template v-if = " showDefaultEmpty " #empty >
463
472
<slot name =" empty" >
464
473
<EmptyIcon class =" mx-auto" />
465
474
<div class =" mt-2" >{{ $t('common.noData') }}</div >
You can’t perform that action at this time.
0 commit comments