Refactor #6683 - For DataView
parent
0bc96d5ef3
commit
8b2ab6dbaf
|
@ -280,6 +280,10 @@ export interface DataViewSlots {
|
||||||
*/
|
*/
|
||||||
layout?: string | undefined;
|
layout?: string | undefined;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
|
/**
|
||||||
|
* Custom paginator container template.
|
||||||
|
*/
|
||||||
|
paginatorcontainer(): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom paginator start template.
|
* Custom paginator start template.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,6 +18,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>
|
||||||
|
@ -51,6 +67,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>
|
||||||
|
@ -65,7 +97,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { resolveFieldData, localeComparator, sort } from '@primeuix/utils/object';
|
import { localeComparator, resolveFieldData, sort } from '@primeuix/utils/object';
|
||||||
import Paginator from 'primevue/paginator';
|
import Paginator from 'primevue/paginator';
|
||||||
import BaseDataView from './BaseDataView.vue';
|
import BaseDataView from './BaseDataView.vue';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue