UNPKG

use-vue3-easy-data-table

Version:

Composables for customize the vue3-easy-data-table.

68 lines (67 loc) 1.69 kB
import { computed as r } from "vue"; function x(t) { const s = r(() => { var e; return (e = t.value) == null ? void 0 : e.currentPageFirstIndex; }), P = r(() => { var e; return (e = t.value) == null ? void 0 : e.currentPageLastIndex; }), u = r(() => { var e; return (e = t.value) == null ? void 0 : e.clientItemsLength; }), n = r(() => { var e; return (e = t.value) == null ? void 0 : e.maxPaginationNumber; }), o = r(() => { var e; return (e = t.value) == null ? void 0 : e.currentPaginationNumber; }), g = r(() => { var e; return (e = t.value) == null ? void 0 : e.isFirstPage; }), c = r(() => { var e; return (e = t.value) == null ? void 0 : e.isLastPage; }); return { currentPageFirstIndex: s, currentPageLastIndex: P, clientItemsLength: u, maxPaginationNumber: n, currentPaginationNumber: o, isFirstPage: g, isLastPage: c, nextPage: () => { var e; (e = t.value) == null || e.nextPage(); }, prevPage: () => { var e; (e = t.value) == null || e.prevPage(); }, updatePage: (e) => { var i; (i = t.value) == null || i.updatePage(e); } }; } function w(t) { const s = r(() => { var n; return (n = t.value) == null ? void 0 : n.rowsPerPageOptions; }), P = r(() => { var n; return (n = t.value) == null ? void 0 : n.rowsPerPageActiveOption; }); return { rowsPerPageOptions: s, rowsPerPageActiveOption: P, updateRowsPerPageActiveOption: (n) => { var o; (o = t.value) == null || o.updateRowsPerPageActiveOption(n); } }; } export { x as usePagination, w as useRowsPerPage };