diff --git a/src/components/generic/ATable.vue b/src/components/generic/ATable.vue index d6ea9b30ed87aa0088c83d4ecfeb3e10e4d45d1d..975ea1b5516467b3d4e60f236ef5cdfdd6fbf27b 100644 --- a/src/components/generic/ATable.vue +++ b/src/components/generic/ATable.vue @@ -2,6 +2,7 @@ <div class="aura-table-scroller"> <div ref="tableWrapperEl" class="aura-table-wrapper" v-bind="attrs"> <table class="aura-table"> + <slot name="tableStart" /> <thead> <slot name="thead"> <tr> @@ -11,13 +12,14 @@ </thead> <tbody> <slot name="body"> - <template v-if="items"> + <slot v-if="items" name="items" :items="items"> <tr v-for="(item, index) in items" :key="index"> <slot :obj="item" :index="index" /> </tr> - </template> + </slot> </slot> </tbody> + <slot name="tableEnd" /> </table> <slot name="footer"> @@ -70,10 +72,13 @@ defineOptions({ }) defineSlots<{ default(props: { obj: T; index: number }): any + items(props: { items: T[] }): any thead(): any header(): any body(): any footer(): any + tableStart(): any + tableEnd(): any }>() const attrs = useAttrs()