diff --git a/packages/materials/src/libs/admin-layout/index.vue b/packages/materials/src/libs/admin-layout/index.vue index 47e56d04..0c0444c6 100644 --- a/packages/materials/src/libs/admin-layout/index.vue +++ b/packages/materials/src/libs/admin-layout/index.vue @@ -28,15 +28,13 @@ const props = withDefaults(defineProps(), { rightFooter: false }); -const emit = defineEmits(); - -const slots = defineSlots(); - interface Emits { /** Update siderCollapse */ (e: 'update:siderCollapse', collapse: boolean): void; } +const emit = defineEmits(); + type SlotFn = (props?: Record) => any; type Slots = { @@ -51,6 +49,9 @@ type Slots = { /** Footer */ footer?: SlotFn; }; + +const slots = defineSlots(); + const cssVars = computed(() => createLayoutCssVars(props)); // config visible diff --git a/packages/materials/src/libs/page-tab/button-tab.vue b/packages/materials/src/libs/page-tab/button-tab.vue index 0ecdd487..be4f2c42 100644 --- a/packages/materials/src/libs/page-tab/button-tab.vue +++ b/packages/materials/src/libs/page-tab/button-tab.vue @@ -8,8 +8,6 @@ defineOptions({ defineProps(); -defineSlots(); - type SlotFn = (props?: Record) => any; type Slots = { @@ -32,6 +30,8 @@ type Slots = { */ suffix?: SlotFn; }; + +defineSlots();