File tree Expand file tree Collapse file tree
packages/effects/plugins/src/vxe-table Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,6 +278,15 @@ const delegatedFormSlots = computed(() => {
278278 return resultSlots .map ((key ) => key .replace (FORM_SLOT_PREFIX , ' ' ));
279279});
280280
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+
281290async function init() {
282291 await nextTick ();
283292 const globalGridConfig = VxeUI ?.getConfig ()?.grid ?? {};
@@ -459,7 +468,7 @@ onUnmounted(() => {
459468 </slot >
460469 </template >
461470 <!-- 统一控状态 -->
462- <template #empty >
471+ <template v-if = " showDefaultEmpty " #empty >
463472 <slot name =" empty" >
464473 <EmptyIcon class =" mx-auto" />
465474 <div class =" mt-2" >{{ $t('common.noData') }}</div >
You can’t perform that action at this time.
0 commit comments