Refactor #3832 Refactor #3833 - TreeTable paginator icon support

pull/3868/head
Tuğçe Küçükoğlu 2023-04-14 18:01:22 +03:00
parent 7c959a44ea
commit fbc8788645
3 changed files with 56 additions and 0 deletions

View File

@ -476,6 +476,22 @@ const TreeTableSlots = [
{
name: 'sorticon',
description: 'Custom sort icon template.'
},
{
name: 'paginatorfirstpagelinkicon',
description: 'Custom paginator first page link icon template.'
},
{
name: 'paginatorprevpagelinkicon',
description: 'Custom paginator prev page link icon template.'
},
{
name: 'paginatornextpagelinkicon',
description: 'Custom paginator next page link icon template.'
},
{
name: 'paginatorlastpagelinkicon',
description: 'Custom paginator last page link icon template.'
}
];

View File

@ -406,6 +406,22 @@ export interface TreeTableSlots {
*/
sortOrder: boolean;
}): VNode[];
/**
* Custom paginator first page link icon template.
*/
paginatorfirstpagelinkicon(): VNode[];
/**
* Custom paginator previous page link icon template.
*/
paginatorprevpagelinkicon(): VNode[];
/**
* Custom paginator next page link icon template.
*/
paginatornextpagelinkicon(): VNode[];
/**
* Custom paginator last page link icon template.
*/
paginatorlastpagelinkicon(): VNode[];
}
/**

View File

@ -29,6 +29,18 @@
<template v-if="$slots.paginatorend" #end>
<slot name="paginatorend"></slot>
</template>
<template v-if="$slots.paginatorfirstpagelinkicon" #firstpagelinkicon>
<slot name="paginatorfirstpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatorprevpagelinkicon" #prevpagelinkicon>
<slot name="paginatorprevpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatornextpagelinkicon" #nextpagelinkicon>
<slot name="paginatornextpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatorlastpagelinkicon" #lastpagelinkicon>
<slot name="paginatorlastpagelinkicon"></slot>
</template>
</TTPaginator>
<div class="p-treetable-wrapper" :style="{ maxHeight: scrollHeight }">
<table ref="table" role="table" v-bind="tableProps">
@ -111,6 +123,18 @@
<template v-if="$slots.paginatorend" #end>
<slot name="paginatorend"></slot>
</template>
<template v-if="$slots.paginatorfirstpagelinkicon" #firstpagelinkicon>
<slot name="paginatorfirstpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatorprevpagelinkicon" #prevpagelinkicon>
<slot name="paginatorprevpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatornextpagelinkicon" #nextpagelinkicon>
<slot name="paginatornextpagelinkicon"></slot>
</template>
<template v-if="$slots.paginatorlastpagelinkicon" #lastpagelinkicon>
<slot name="paginatorlastpagelinkicon"></slot>
</template>
</TTPaginator>
<div v-if="$slots.footer" class="p-treetable-footer">
<slot name="footer"></slot>