Refactor #6683 - For TreeTable

pull/6687/head
tugcekucukoglu 2024-10-30 15:10:26 +03:00
parent d93ee94e5d
commit e09e9ea38f
2 changed files with 44 additions and 8 deletions

View File

@ -658,14 +658,6 @@ export interface TreeTableSlots {
* Custom footer template. * Custom footer template.
*/ */
footer(): VNode[]; footer(): VNode[];
/**
* Custom paginator start template.
*/
paginatorstart(): VNode[];
/**
* Custom paginator end template.
*/
paginatorend(): VNode[];
/** /**
* Custom empty template. * Custom empty template.
*/ */
@ -678,6 +670,18 @@ export interface TreeTableSlots {
* Custom checkbox icon template. * Custom checkbox icon template.
*/ */
checkboxicon(): VNode[]; checkboxicon(): VNode[];
/**
* Custom paginator container template.
*/
paginatorcontainer(): VNode[];
/**
* Custom paginator start template.
*/
paginatorstart(): VNode[];
/**
* Custom paginator end template.
*/
paginatorend(): VNode[];
/** /**
* Custom paginator first page link icon template. * Custom paginator first page link icon template.
*/ */

View File

@ -26,6 +26,22 @@
:unstyled="unstyled" :unstyled="unstyled"
:pt="ptm('pcPaginator')" :pt="ptm('pcPaginator')"
> >
<template v-if="$slots.paginatorcontainer" #container="slotProps">
<slot
name="paginatorcontainer"
:first="slotProps.first"
:last="slotProps.last"
:rows="slotProps.rows"
:page="slotProps.page"
:pageCount="slotProps.pageCount"
:totalRecords="slotProps.totalRecords"
:firstPageCallback="slotProps.firstPageCallback"
:lastPageCallback="slotProps.lastPageCallback"
:prevPageCallback="slotProps.prevPageCallback"
:nextPageCallback="slotProps.nextPageCallback"
:rowChangeCallback="slotProps.rowChangeCallback"
></slot>
</template>
<template v-if="$slots.paginatorstart" #start> <template v-if="$slots.paginatorstart" #start>
<slot name="paginatorstart"></slot> <slot name="paginatorstart"></slot>
</template> </template>
@ -138,6 +154,22 @@
:unstyled="unstyled" :unstyled="unstyled"
:pt="ptm('pcPaginator')" :pt="ptm('pcPaginator')"
> >
<template v-if="$slots.paginatorcontainer" #container="slotProps">
<slot
name="paginatorcontainer"
:first="slotProps.first"
:last="slotProps.last"
:rows="slotProps.rows"
:page="slotProps.page"
:pageCount="slotProps.pageCount"
:totalRecords="slotProps.totalRecords"
:firstPageCallback="slotProps.firstPageCallback"
:lastPageCallback="slotProps.lastPageCallback"
:prevPageCallback="slotProps.prevPageCallback"
:nextPageCallback="slotProps.nextPageCallback"
:rowChangeCallback="slotProps.rowChangeCallback"
></slot>
</template>
<template v-if="$slots.paginatorstart" #start> <template v-if="$slots.paginatorstart" #start>
<slot name="paginatorstart"></slot> <slot name="paginatorstart"></slot>
</template> </template>