v-page 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,12 +67,30 @@ import { PaginationBar } from 'v-page'
67
67
  v-model="pageNumber"
68
68
  :total-row="totalRow"
69
69
  @change="paginationChange"
70
- />
70
+ >
71
+ <PaginationPageSizeOptions />
72
+ <PaginationInfo />
73
+ <PaginationFirstPage />
74
+ <PaginationPreviousPage />
75
+ <PaginationPageNumbers />
76
+ <PaginationNextPage />
77
+ <PaginationLastPage />
78
+ </PaginationBar>
71
79
  </template>
72
80
 
73
81
  <script setup lang='ts'>
74
82
  import { ref } from 'vue'
75
- import { PaginationBar } from 'v-page'
83
+ import {
84
+ PaginationBar,
85
+ PaginationPageSizeOptions,
86
+ PaginationInfo,
87
+ PaginationPanel,
88
+ PaginationPageNumbers,
89
+ PaginationFirstPage,
90
+ PaginationPreviousPage,
91
+ PaginationNextPage,
92
+ PaginationLastPage
93
+ } from 'v-page'
76
94
  import type { PageInfo } from 'v-page'
77
95
  // set default page to 3
78
96
  const pageNumber = ref<number>(3)
package/dist/v-page.js CHANGED
@@ -1,232 +1,62 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".v-pagination{display:flex;justify-content:flex-start;box-sizing:border-box}.v-pagination--right{justify-content:flex-end}.v-pagination--center{justify-content:center}.v-pagination.v-pagination--disabled a,.v-pagination.v-pagination--disabled select{color:#ddd!important}.v-pagination.v-pagination--disabled .v-pagination__item a{cursor:default!important}.v-pagination.v-pagination--disabled .v-pagination__item a:hover{background-color:transparent}.v-pagination.v-pagination--disabled.v-pagination--border ul{background-color:#fafafa}.v-pagination.v-pagination--circle .v-pagination__item a{border-radius:50rem;border:1px solid transparent;min-height:30px;min-width:30px;padding:0 .6rem;display:flex;align-items:center;justify-content:center}.v-pagination.v-pagination--circle .v-pagination__item a:hover{border:1px solid #f7f7f7}.v-pagination.v-pagination--circle .v-pagination__item.disabled a:hover{border:1px solid transparent}.v-pagination.v-pagination--circle .v-pagination__item.active a{border:1px solid #ddd!important;background-color:transparent!important;box-shadow:0 1px 3px #0000001a}.v-pagination ul{margin:0;padding:0;display:flex}.v-pagination ul li{list-style:none;display:flex}.v-pagination ul li a{padding:.3rem .6rem;text-decoration:none;line-height:1.3;font-size:14px;margin:0;outline:0;color:#333;border-radius:.5rem;display:inline-flex;align-items:center;cursor:default}.v-pagination ul li.v-pagination__list a,.v-pagination ul li.v-pagination__info a{color:#888}.v-pagination ul li.active a,.v-pagination ul li.disabled a{cursor:default!important}.v-pagination ul li.v-pagination__item a:hover{background-color:#f7f7f7;color:#000;cursor:pointer}.v-pagination ul li.active a{background-color:#eee!important;color:#aaa}.v-pagination ul li.active a:hover{color:#aaa}.v-pagination ul li.disabled a{color:#ddd!important}.v-pagination ul li.disabled a:hover{background-color:transparent}.v-pagination ul li select{width:auto!important;font-size:12px;padding:0;outline:0;margin:0 0 0 5px;border:1px solid #ccc;color:#333;border-radius:.3rem}.v-pagination.v-pagination--border ul{box-shadow:0 1px 2px #0000000d;border-radius:.5rem}.v-pagination.v-pagination--border ul li a{border:1px solid #DEE2E6;border-left:0;border-radius:0}.v-pagination.v-pagination--border ul li:first-child>a{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem;border-left:1px solid #DEE2E6}.v-pagination.v-pagination--border ul li:last-child>a{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.v-pagination.v-pagination--border ul li.active a{color:#aaa;background-color:#eee}")),document.head.appendChild(i)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { toRefs as H, ref as A, computed as b, watch as w, onMounted as J, createVNode as t, isVNode as q, defineComponent as K } from "vue";
3
- const [
4
- Q,
5
- h,
6
- W,
7
- X,
8
- Y
9
- ] = ["cn", "en", "de", "jp", "pt"], V = {
10
- [Q]: {
2
+ import { defineComponent as T, toRefs as w, ref as h, computed as b, watch as F, onMounted as C, provide as G, createVNode as n, inject as d, isVNode as k } from "vue";
3
+ const g = 1, D = 5, L = 10, V = [L, 20, 50, 100], A = 0, [X, Y, x] = ["left", "center", "right"], s = Symbol("pagination"), [
4
+ U,
5
+ S,
6
+ Z,
7
+ H,
8
+ J
9
+ ] = ["cn", "en", "de", "jp", "pt"], B = {
10
+ [U]: {
11
11
  pageLength: "每页记录数",
12
12
  pageInfo: "第 #pageNumber#/#totalPage# 页(共#totalRow#条记录)",
13
13
  first: "首页",
14
14
  last: "尾页",
15
15
  all: "全部"
16
16
  },
17
- [h]: {
17
+ [S]: {
18
18
  pageLength: "Per page",
19
19
  pageInfo: "Page #pageNumber#/#totalPage# (total #totalRow# records)",
20
20
  first: "First",
21
21
  last: "Last",
22
22
  all: "All"
23
23
  },
24
- [W]: {
24
+ [Z]: {
25
25
  pageLength: "Seitenlänge",
26
26
  pageInfo: "Aktuell #pageNumber#/#totalPage# (gesamt #totalRow# Aufzeichnungen)",
27
27
  first: "Zuerst",
28
28
  last: "Letzte",
29
29
  all: "Alle"
30
30
  },
31
- [X]: {
31
+ [H]: {
32
32
  pageLength: "ページごとの記録数",
33
33
  pageInfo: "現在の第 #pageNumber#/#totalPage# ページ(全部で #totalRow# 条の記録)",
34
34
  first: "トップページ",
35
35
  last: "尾のページ",
36
36
  all: "すべて"
37
37
  },
38
- [Y]: {
38
+ [J]: {
39
39
  pageLength: "Resultados por página",
40
40
  pageInfo: "#pageNumber#/#totalPage# (total de #totalRow#)",
41
41
  first: "Início",
42
42
  last: "Fim",
43
43
  all: "Todos"
44
44
  }
45
- }, f = 1, $ = 5, R = 10, F = [R, 20, 50, 100], z = 0, [ie, oe, ee] = ["left", "center", "right"];
46
- function ae(e, u, l) {
47
- if (u <= l) return f;
48
- const d = Math.floor(l / 2), r = u - l + 1, s = e - d;
49
- return s < f ? f : s > r ? r : s;
50
- }
51
- function te(e, u, l) {
52
- const d = ae(e, u, l);
53
- return Array.from({ length: l }).map((r, s) => d + s).filter((r) => r >= f && r <= u);
54
- }
55
- function le(e = h) {
56
- const u = String(e).toLowerCase();
57
- return V[Object.hasOwn(V, u) ? u : h];
45
+ };
46
+ function q(e, a, t) {
47
+ if (a <= t) return g;
48
+ const i = Math.floor(t / 2), u = a - t + 1, l = e - i;
49
+ return l < g ? g : l > u ? u : l;
58
50
  }
59
- function E(e) {
60
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !q(e);
51
+ function K(e, a, t) {
52
+ const i = q(e, a, t);
53
+ return Array.from({ length: t }).map((u, l) => i + l).filter((u) => u >= g && u <= a);
61
54
  }
62
- function ne(e, u, l) {
63
- const {
64
- pageSizeOptions: d,
65
- pageSizeMenu: r,
66
- totalRow: s
67
- } = H(e), n = A(0), v = A($), i = A(e.pageSize ?? R), p = le(e.language), m = b(() => {
68
- if (!d.value) return [];
69
- const a = Array.from(Array.isArray(r.value) && r.value.length > 0 ? r.value : F);
70
- return i.value !== 0 && !a.includes(i.value) && a.push(i.value), a.sort((o, g) => o - g);
71
- }), c = b(() => i.value === z ? f : Math.ceil(s.value / i.value)), y = b(() => te(n.value, c.value, v.value)), C = b(() => ({
72
- "v-pagination": !0,
73
- "v-pagination--right": e.align === "right",
74
- "v-pagination--center": e.align === "center",
75
- "v-pagination--disabled": e.disabled,
76
- "v-pagination--border": e.border,
77
- "v-pagination--circle": !e.border && e.circle
78
- })), I = b(() => n.value === f), L = b(() => n.value === c.value);
79
- w(() => e.modelValue, N), w(() => e.pageSize, B);
80
- function N(a = f) {
81
- if (e.disabled || typeof a != "number") return;
82
- let o = a < f ? f : a;
83
- a > c.value && c.value > 0 && (o = c.value), o !== n.value && (n.value = o, u("update:modelValue", n.value), O());
84
- }
85
- function B(a) {
86
- if (typeof a == "number" && !(a < 0) && a !== i.value) {
87
- if (i.value = a, u("update:pageSize", i.value), n.value === f)
88
- return O();
89
- N(f);
90
- }
91
- }
92
- function O() {
93
- u("change", {
94
- pageNumber: n.value,
95
- pageSize: Number(i.value),
96
- totalPage: c.value
97
- });
98
- }
99
- function S(a, {
100
- slots: o
101
- }) {
102
- var g;
103
- return t("a", {
104
- href: "javascript:void(0)"
105
- }, [(g = o == null ? void 0 : o.default) == null ? void 0 : g.call(o)]);
106
- }
107
- function M() {
108
- if (!d.value) return null;
109
- const a = () => m.value.map((g) => t("option", {
110
- key: g,
111
- value: g,
112
- selected: i.value === g
113
- }, [g])), o = () => e.displayAll ? t("option", {
114
- value: z,
115
- selected: i.value === z
116
- }, [p.all]) : null;
117
- return t("li", {
118
- class: "v-pagination__list"
119
- }, [t(S, null, {
120
- default: () => [t("span", null, [p.pageLength]), t("select", {
121
- disabled: e.disabled,
122
- onChange: (g) => B(Number(g.target.value))
123
- }, [t(a, null, null), t(o, null, null)])]
124
- })]);
125
- }
126
- function T() {
127
- if (!e.info) return null;
128
- const a = p.pageInfo.replace("#pageNumber#", n.value).replace("#totalPage#", c.value).replace("#totalRow#", s.value);
129
- return t("li", {
130
- class: "v-pagination__info"
131
- }, [t(S, null, E(a) ? a : {
132
- default: () => [a]
133
- })]);
134
- }
135
- function j() {
136
- let a;
137
- if (!Object.hasOwn(l, "default")) return null;
138
- const o = {
139
- pageNumber: n.value,
140
- pageSize: i.value,
141
- totalPage: c.value,
142
- totalRow: s.value,
143
- isFirst: I.value,
144
- isLast: L.value
145
- };
146
- return t("li", {
147
- class: "v-pagination__slot"
148
- }, [t(S, null, E(a = l.default(o)) ? a : {
149
- default: () => [a]
150
- })]);
151
- }
152
- function P({
153
- classes: a,
154
- pageNumberValue: o,
155
- name: g,
156
- hasItem: Z = !0
157
- }) {
158
- return Z ? t("li", {
159
- class: ["v-pagination__item", ...a]
160
- }, [t(S, {
161
- onClick: () => N(o)
162
- }, E(g) ? g : {
163
- default: () => [g]
164
- })]) : null;
165
- }
166
- function G() {
167
- return e.pageNumber ? y.value.map((a) => t(P, {
168
- key: a,
169
- classes: [{
170
- active: a === n.value
171
- }],
172
- pageNumberValue: a,
173
- name: a
174
- }, null)) : null;
175
- }
176
- function k() {
177
- return t(P, {
178
- classes: ["v-pagination__first", {
179
- disabled: I.value
180
- }],
181
- pageNumberValue: f,
182
- name: p.first,
183
- hasItem: e.first
184
- }, null);
185
- }
186
- function D() {
187
- return t(P, {
188
- classes: ["v-pagination__previous", {
189
- disabled: I.value
190
- }],
191
- pageNumberValue: n.value - 1,
192
- name: "«"
193
- }, null);
194
- }
195
- function x() {
196
- return t(P, {
197
- classes: ["v-pagination__next", {
198
- disabled: L.value
199
- }],
200
- pageNumberValue: n.value + 1,
201
- name: "»"
202
- }, null);
203
- }
204
- function U() {
205
- return t(P, {
206
- classes: ["v-pagination__last", {
207
- disabled: L.value
208
- }],
209
- pageNumberValue: c.value,
210
- name: p.last,
211
- hasItem: e.last
212
- }, null);
213
- }
214
- return J(() => N(e.modelValue || f)), {
215
- containerClasses: C,
216
- totalPage: c,
217
- current: n,
218
- pageNumbers: y,
219
- PageSizeOptions: M,
220
- PageInformation: T,
221
- PageSlot: j,
222
- PageNumberItems: G,
223
- FirstPageItem: k,
224
- PreviousPageItem: D,
225
- NextPageItem: x,
226
- LastPageItem: U
227
- };
55
+ function Q(e = S) {
56
+ const a = String(e).toLowerCase();
57
+ return B[Object.hasOwn(B, a) ? a : S];
228
58
  }
229
- const _ = /* @__PURE__ */ K({
59
+ const N = /* @__PURE__ */ T({
230
60
  name: "PaginationBar",
231
61
  props: {
232
62
  modelValue: {
@@ -235,7 +65,7 @@ const _ = /* @__PURE__ */ K({
235
65
  },
236
66
  pageSize: {
237
67
  type: Number,
238
- default: R
68
+ default: L
239
69
  },
240
70
  totalRow: {
241
71
  type: Number,
@@ -243,7 +73,7 @@ const _ = /* @__PURE__ */ K({
243
73
  },
244
74
  language: {
245
75
  type: String,
246
- default: h
76
+ default: S
247
77
  },
248
78
  /**
249
79
  * Pagination alignment direction
@@ -251,17 +81,12 @@ const _ = /* @__PURE__ */ K({
251
81
  */
252
82
  align: {
253
83
  type: String,
254
- default: ee
84
+ default: x
255
85
  },
256
86
  /** Page size list */
257
87
  pageSizeMenu: {
258
88
  type: [Array],
259
- default: () => F
260
- },
261
- /** Display page size menu panel */
262
- pageSizeOptions: {
263
- type: Boolean,
264
- default: !0
89
+ default: () => V
265
90
  },
266
91
  disabled: {
267
92
  type: Boolean,
@@ -276,24 +101,6 @@ const _ = /* @__PURE__ */ K({
276
101
  type: Boolean,
277
102
  default: !1
278
103
  },
279
- info: {
280
- type: Boolean,
281
- default: !0
282
- },
283
- pageNumber: {
284
- type: Boolean,
285
- default: !0
286
- },
287
- /** first page button */
288
- first: {
289
- type: Boolean,
290
- default: !0
291
- },
292
- /** last page button */
293
- last: {
294
- type: Boolean,
295
- default: !0
296
- },
297
104
  /**
298
105
  * Display all records
299
106
  *
@@ -312,43 +119,241 @@ const _ = /* @__PURE__ */ K({
312
119
  },
313
120
  emits: ["update:modelValue", "update:pageSize", "change"],
314
121
  setup(e, {
315
- emit: u,
316
- slots: l
122
+ emit: a,
123
+ slots: t
317
124
  }) {
318
125
  const {
319
- containerClasses: d,
320
- totalPage: r,
321
- PageSizeOptions: s,
322
- PageInformation: n,
323
- PageSlot: v,
324
- PageNumberItems: i,
325
- FirstPageItem: p,
326
- PreviousPageItem: m,
327
- NextPageItem: c,
328
- LastPageItem: y
329
- } = ne(e, u, l);
330
- return () => e.hideOnSinglePage && r.value <= 1 ? null : t("div", {
331
- class: d.value
332
- }, [t("ul", null, [t(s, null, null), t(n, null, null), t(v, null, null), t(p, null, null), t(m, null, null), t(i, null, null), t(c, null, null), t(y, null, null)])]);
126
+ pageSizeMenu: i,
127
+ totalRow: u
128
+ } = w(e), l = h(0), v = h(D), o = h(e.pageSize ?? L), f = b(() => {
129
+ const r = Array.from(Array.isArray(i.value) && i.value.length > 0 ? i.value : V);
130
+ return o.value !== 0 && !r.includes(o.value) && r.push(o.value), r.sort((p, M) => p - M);
131
+ }), c = b(() => o.value === A ? g : Math.ceil(u.value / o.value)), P = b(() => K(l.value, c.value, v.value)), j = b(() => ({
132
+ "v-pagination": !0,
133
+ "v-pagination--right": e.align === "right",
134
+ "v-pagination--center": e.align === "center",
135
+ "v-pagination--disabled": e.disabled,
136
+ "v-pagination--border": e.border,
137
+ "v-pagination--circle": !e.border && e.circle
138
+ })), z = b(() => l.value === g), E = b(() => l.value === c.value);
139
+ F(() => e.modelValue, y), F(() => e.pageSize, R);
140
+ function y(r = g) {
141
+ if (e.disabled || typeof r != "number") return;
142
+ let p = r < g ? g : r;
143
+ r > c.value && c.value > 0 && (p = c.value), p !== l.value && (l.value = p, a("update:modelValue", l.value), I());
144
+ }
145
+ function R(r) {
146
+ if (typeof r == "number" && !(r < 0) && r !== o.value) {
147
+ if (o.value = r, a("update:pageSize", o.value), l.value === g)
148
+ return I();
149
+ y(g);
150
+ }
151
+ }
152
+ function I() {
153
+ a("change", {
154
+ pageNumber: l.value,
155
+ pageSize: Number(o.value),
156
+ totalPage: c.value
157
+ });
158
+ }
159
+ return C(() => y(e.modelValue || g)), G(s, {
160
+ lang: Q(e.language),
161
+ pageSize: o,
162
+ sizeList: f,
163
+ pageNumbers: P,
164
+ isFirst: z,
165
+ isLast: E,
166
+ current: l,
167
+ totalPage: c,
168
+ changePageNumber: y,
169
+ changePageSize: R,
170
+ ...w(e)
171
+ }), () => {
172
+ var p;
173
+ if (e.hideOnSinglePage && c.value <= 1) return null;
174
+ const r = {
175
+ pageNumber: l.value,
176
+ pageSize: o.value,
177
+ totalPage: c.value,
178
+ totalRow: u.value,
179
+ isFirst: z.value,
180
+ isLast: E.value
181
+ };
182
+ return n("div", {
183
+ class: j.value
184
+ }, [n("ul", null, [(p = t == null ? void 0 : t.default) == null ? void 0 : p.call(t, r)])]);
185
+ };
333
186
  }
334
187
  });
335
- _.install = (e, u = {}) => {
336
- if (Object.keys(u).length) {
337
- const { props: l } = _, {
338
- language: d,
339
- align: r,
340
- info: s,
341
- border: n,
342
- pageNumber: v,
343
- first: i,
344
- last: p,
345
- pageSizeMenu: m
346
- } = u;
347
- d && (l.language.default = d), r && (l.align.default = r), typeof s == "boolean" && (l.info.default = s), typeof n == "boolean" && (l.border.default = n), typeof v == "boolean" && (l.pageNumber.default = v), typeof i == "boolean" && (l.first.default = i), typeof p == "boolean" && (l.last.default = p), typeof m < "u" && (l.pageSizeMenu.default = m);
188
+ function O(e) {
189
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
190
+ }
191
+ function _(e, {
192
+ slots: a
193
+ }) {
194
+ var t;
195
+ return n("a", {
196
+ href: "javascript:void(0)"
197
+ }, [(t = a == null ? void 0 : a.default) == null ? void 0 : t.call(a)]);
198
+ }
199
+ function m({
200
+ classes: e,
201
+ pageNumberValue: a,
202
+ name: t
203
+ }) {
204
+ const {
205
+ changePageNumber: i
206
+ } = d(s);
207
+ return n("li", {
208
+ class: ["v-pagination__item", ...e]
209
+ }, [n(_, {
210
+ onClick: () => i(a)
211
+ }, O(t) ? t : {
212
+ default: () => [t]
213
+ })]);
214
+ }
215
+ function $() {
216
+ const {
217
+ lang: e,
218
+ sizeList: a,
219
+ pageSize: t,
220
+ disabled: i,
221
+ displayAll: u,
222
+ changePageSize: l
223
+ } = d(s), v = () => a.value.map((f) => n("option", {
224
+ key: f,
225
+ value: f,
226
+ selected: t.value === f
227
+ }, [f])), o = () => u.value ? n("option", {
228
+ value: A,
229
+ selected: t.value === A
230
+ }, [e.all]) : null;
231
+ return n("li", {
232
+ class: "v-pagination__list"
233
+ }, [n(_, null, {
234
+ default: () => [n("span", null, [e.pageLength]), n("select", {
235
+ disabled: i.value,
236
+ onChange: (f) => l(Number(f.target.value))
237
+ }, [n(v, null, null), n(o, null, null)])]
238
+ })]);
239
+ }
240
+ function ee() {
241
+ const {
242
+ lang: e,
243
+ current: a,
244
+ totalPage: t,
245
+ totalRow: i
246
+ } = d(s), u = e.pageInfo.replace("#pageNumber#", a.value).replace("#totalPage#", t.value).replace("#totalRow#", i.value);
247
+ return n("li", {
248
+ class: "v-pagination__info"
249
+ }, [n(_, null, O(u) ? u : {
250
+ default: () => [u]
251
+ })]);
252
+ }
253
+ function ae(e, {
254
+ slots: a
255
+ }) {
256
+ return n("li", {
257
+ class: "v-pagination__slot"
258
+ }, [n(_, null, {
259
+ default: () => {
260
+ var t;
261
+ return [(t = a == null ? void 0 : a.default) == null ? void 0 : t.call(a)];
262
+ }
263
+ })]);
264
+ }
265
+ function te() {
266
+ const {
267
+ pageNumbers: e,
268
+ current: a
269
+ } = d(s);
270
+ return e.value.map((t) => n(m, {
271
+ key: t,
272
+ classes: [{
273
+ active: t === a.value
274
+ }],
275
+ pageNumberValue: t,
276
+ name: t
277
+ }, null));
278
+ }
279
+ function ne() {
280
+ const {
281
+ isFirst: e,
282
+ lang: a
283
+ } = d(s);
284
+ return n(m, {
285
+ classes: ["v-pagination__first", {
286
+ disabled: e.value
287
+ }],
288
+ pageNumberValue: g,
289
+ name: a.first
290
+ }, null);
291
+ }
292
+ function le() {
293
+ const {
294
+ isFirst: e,
295
+ current: a
296
+ } = d(s);
297
+ return n(m, {
298
+ classes: ["v-pagination__previous", {
299
+ disabled: e.value
300
+ }],
301
+ pageNumberValue: a.value - 1,
302
+ name: "«"
303
+ }, null);
304
+ }
305
+ function ue() {
306
+ const {
307
+ isLast: e,
308
+ current: a
309
+ } = d(s);
310
+ return n(m, {
311
+ classes: ["v-pagination__next", {
312
+ disabled: e.value
313
+ }],
314
+ pageNumberValue: a.value + 1,
315
+ name: "»"
316
+ }, null);
317
+ }
318
+ function ie() {
319
+ const {
320
+ isLast: e,
321
+ totalPage: a,
322
+ lang: t
323
+ } = d(s);
324
+ return n(m, {
325
+ classes: ["v-pagination__last", {
326
+ disabled: e.value
327
+ }],
328
+ pageNumberValue: a.value,
329
+ name: t.last
330
+ }, null);
331
+ }
332
+ N.install = (e, a = {}) => {
333
+ if (Object.keys(a).length) {
334
+ const { props: t } = N, {
335
+ language: i,
336
+ align: u,
337
+ info: l,
338
+ border: v,
339
+ pageNumber: o,
340
+ first: f,
341
+ last: c,
342
+ pageSizeMenu: P
343
+ } = a;
344
+ i && (t.language.default = i), u && (t.align.default = u), typeof l == "boolean" && (t.info.default = l), typeof v == "boolean" && (t.border.default = v), typeof o == "boolean" && (t.pageNumber.default = o), typeof f == "boolean" && (t.first.default = f), typeof c == "boolean" && (t.last.default = c), typeof P < "u" && (t.pageSizeMenu.default = P);
348
345
  }
349
- e.component(_.name, _);
346
+ e.component(N.name, N);
350
347
  };
351
348
  export {
352
- _ as PaginationBar,
353
- _ as default
349
+ N as PaginationBar,
350
+ ne as PaginationFirstPage,
351
+ ee as PaginationInfo,
352
+ ie as PaginationLastPage,
353
+ ue as PaginationNextPage,
354
+ te as PaginationPageNumbers,
355
+ $ as PaginationPageSizeOptions,
356
+ ae as PaginationPanel,
357
+ le as PaginationPreviousPage,
358
+ N as default
354
359
  };
@@ -1,2 +1,2 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".v-pagination{display:flex;justify-content:flex-start;box-sizing:border-box}.v-pagination--right{justify-content:flex-end}.v-pagination--center{justify-content:center}.v-pagination.v-pagination--disabled a,.v-pagination.v-pagination--disabled select{color:#ddd!important}.v-pagination.v-pagination--disabled .v-pagination__item a{cursor:default!important}.v-pagination.v-pagination--disabled .v-pagination__item a:hover{background-color:transparent}.v-pagination.v-pagination--disabled.v-pagination--border ul{background-color:#fafafa}.v-pagination.v-pagination--circle .v-pagination__item a{border-radius:50rem;border:1px solid transparent;min-height:30px;min-width:30px;padding:0 .6rem;display:flex;align-items:center;justify-content:center}.v-pagination.v-pagination--circle .v-pagination__item a:hover{border:1px solid #f7f7f7}.v-pagination.v-pagination--circle .v-pagination__item.disabled a:hover{border:1px solid transparent}.v-pagination.v-pagination--circle .v-pagination__item.active a{border:1px solid #ddd!important;background-color:transparent!important;box-shadow:0 1px 3px #0000001a}.v-pagination ul{margin:0;padding:0;display:flex}.v-pagination ul li{list-style:none;display:flex}.v-pagination ul li a{padding:.3rem .6rem;text-decoration:none;line-height:1.3;font-size:14px;margin:0;outline:0;color:#333;border-radius:.5rem;display:inline-flex;align-items:center;cursor:default}.v-pagination ul li.v-pagination__list a,.v-pagination ul li.v-pagination__info a{color:#888}.v-pagination ul li.active a,.v-pagination ul li.disabled a{cursor:default!important}.v-pagination ul li.v-pagination__item a:hover{background-color:#f7f7f7;color:#000;cursor:pointer}.v-pagination ul li.active a{background-color:#eee!important;color:#aaa}.v-pagination ul li.active a:hover{color:#aaa}.v-pagination ul li.disabled a{color:#ddd!important}.v-pagination ul li.disabled a:hover{background-color:transparent}.v-pagination ul li select{width:auto!important;font-size:12px;padding:0;outline:0;margin:0 0 0 5px;border:1px solid #ccc;color:#333;border-radius:.3rem}.v-pagination.v-pagination--border ul{box-shadow:0 1px 2px #0000000d;border-radius:.5rem}.v-pagination.v-pagination--border ul li a{border:1px solid #DEE2E6;border-left:0;border-radius:0}.v-pagination.v-pagination--border ul li:first-child>a{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem;border-left:1px solid #DEE2E6}.v-pagination.v-pagination--border ul li:last-child>a{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.v-pagination.v-pagination--border ul li.active a{color:#aaa;background-color:#eee}")),document.head.appendChild(i)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m.VPage={},m.Vue))})(this,function(m,e){"use strict";const[w,y,T,F,M]=["cn","en","de","jp","pt"],E={[w]:{pageLength:"每页记录数",pageInfo:"第 #pageNumber#/#totalPage# 页(共#totalRow#条记录)",first:"首页",last:"尾页",all:"全部"},[y]:{pageLength:"Per page",pageInfo:"Page #pageNumber#/#totalPage# (total #totalRow# records)",first:"First",last:"Last",all:"All"},[T]:{pageLength:"Seitenlänge",pageInfo:"Aktuell #pageNumber#/#totalPage# (gesamt #totalRow# Aufzeichnungen)",first:"Zuerst",last:"Letzte",all:"Alle"},[F]:{pageLength:"ページごとの記録数",pageInfo:"現在の第 #pageNumber#/#totalPage# ページ(全部で #totalRow# 条の記録)",first:"トップページ",last:"尾のページ",all:"すべて"},[M]:{pageLength:"Resultados por página",pageInfo:"#pageNumber#/#totalPage# (total de #totalRow#)",first:"Início",last:"Fim",all:"Todos"}},f=1,j=5,I=10,R=[I,20,50,100],v=0,[$,ee,C]=["left","center","right"];function G(t,o,n){if(o<=n)return f;const d=Math.floor(n/2),i=o-n+1,c=t-d;return c<f?f:c>i?i:c}function k(t,o,n){const d=G(t,o,n);return Array.from({length:n}).map((i,c)=>d+c).filter(i=>i>=f&&i<=o)}function D(t=y){const o=String(t).toLowerCase();return E[Object.hasOwn(E,o)?o:y]}function L(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function x(t,o,n){const{pageSizeOptions:d,pageSizeMenu:i,totalRow:c}=e.toRefs(t),l=e.ref(0),b=e.ref(j),u=e.ref(t.pageSize??I),p=D(t.language),P=e.computed(()=>{if(!d.value)return[];const a=Array.from(Array.isArray(i.value)&&i.value.length>0?i.value:R);return u.value!==0&&!a.includes(u.value)&&a.push(u.value),a.sort((r,g)=>r-g)}),s=e.computed(()=>u.value===v?f:Math.ceil(c.value/u.value)),h=e.computed(()=>k(l.value,s.value,b.value)),U=e.computed(()=>({"v-pagination":!0,"v-pagination--right":t.align==="right","v-pagination--center":t.align==="center","v-pagination--disabled":t.disabled,"v-pagination--border":t.border,"v-pagination--circle":!t.border&&t.circle})),A=e.computed(()=>l.value===f),z=e.computed(()=>l.value===s.value);e.watch(()=>t.modelValue,S),e.watch(()=>t.pageSize,B);function S(a=f){if(t.disabled||typeof a!="number")return;let r=a<f?f:a;a>s.value&&s.value>0&&(r=s.value),r!==l.value&&(l.value=r,o("update:modelValue",l.value),O())}function B(a){if(typeof a=="number"&&!(a<0)&&a!==u.value){if(u.value=a,o("update:pageSize",u.value),l.value===f)return O();S(f)}}function O(){o("change",{pageNumber:l.value,pageSize:Number(u.value),totalPage:s.value})}function _(a,{slots:r}){var g;return e.createVNode("a",{href:"javascript:void(0)"},[(g=r==null?void 0:r.default)==null?void 0:g.call(r)])}function Z(){if(!d.value)return null;const a=()=>P.value.map(g=>e.createVNode("option",{key:g,value:g,selected:u.value===g},[g])),r=()=>t.displayAll?e.createVNode("option",{value:v,selected:u.value===v},[p.all]):null;return e.createVNode("li",{class:"v-pagination__list"},[e.createVNode(_,null,{default:()=>[e.createVNode("span",null,[p.pageLength]),e.createVNode("select",{disabled:t.disabled,onChange:g=>B(Number(g.target.value))},[e.createVNode(a,null,null),e.createVNode(r,null,null)])]})])}function q(){if(!t.info)return null;const a=p.pageInfo.replace("#pageNumber#",l.value).replace("#totalPage#",s.value).replace("#totalRow#",c.value);return e.createVNode("li",{class:"v-pagination__info"},[e.createVNode(_,null,L(a)?a:{default:()=>[a]})])}function H(){let a;if(!Object.hasOwn(n,"default"))return null;const r={pageNumber:l.value,pageSize:u.value,totalPage:s.value,totalRow:c.value,isFirst:A.value,isLast:z.value};return e.createVNode("li",{class:"v-pagination__slot"},[e.createVNode(_,null,L(a=n.default(r))?a:{default:()=>[a]})])}function V({classes:a,pageNumberValue:r,name:g,hasItem:Y=!0}){return Y?e.createVNode("li",{class:["v-pagination__item",...a]},[e.createVNode(_,{onClick:()=>S(r)},L(g)?g:{default:()=>[g]})]):null}function J(){return t.pageNumber?h.value.map(a=>e.createVNode(V,{key:a,classes:[{active:a===l.value}],pageNumberValue:a,name:a},null)):null}function K(){return e.createVNode(V,{classes:["v-pagination__first",{disabled:A.value}],pageNumberValue:f,name:p.first,hasItem:t.first},null)}function Q(){return e.createVNode(V,{classes:["v-pagination__previous",{disabled:A.value}],pageNumberValue:l.value-1,name:"«"},null)}function W(){return e.createVNode(V,{classes:["v-pagination__next",{disabled:z.value}],pageNumberValue:l.value+1,name:"»"},null)}function X(){return e.createVNode(V,{classes:["v-pagination__last",{disabled:z.value}],pageNumberValue:s.value,name:p.last,hasItem:t.last},null)}return e.onMounted(()=>S(t.modelValue||f)),{containerClasses:U,totalPage:s,current:l,pageNumbers:h,PageSizeOptions:Z,PageInformation:q,PageSlot:H,PageNumberItems:J,FirstPageItem:K,PreviousPageItem:Q,NextPageItem:W,LastPageItem:X}}const N=e.defineComponent({name:"PaginationBar",props:{modelValue:{type:Number,default:0},pageSize:{type:Number,default:I},totalRow:{type:Number,default:0},language:{type:String,default:y},align:{type:String,default:C},pageSizeMenu:{type:[Array],default:()=>R},pageSizeOptions:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},border:{type:Boolean,default:!1},info:{type:Boolean,default:!0},pageNumber:{type:Boolean,default:!0},first:{type:Boolean,default:!0},last:{type:Boolean,default:!0},displayAll:{type:Boolean,default:!1},hideOnSinglePage:{type:Boolean,default:!1}},emits:["update:modelValue","update:pageSize","change"],setup(t,{emit:o,slots:n}){const{containerClasses:d,totalPage:i,PageSizeOptions:c,PageInformation:l,PageSlot:b,PageNumberItems:u,FirstPageItem:p,PreviousPageItem:P,NextPageItem:s,LastPageItem:h}=x(t,o,n);return()=>t.hideOnSinglePage&&i.value<=1?null:e.createVNode("div",{class:d.value},[e.createVNode("ul",null,[e.createVNode(c,null,null),e.createVNode(l,null,null),e.createVNode(b,null,null),e.createVNode(p,null,null),e.createVNode(P,null,null),e.createVNode(u,null,null),e.createVNode(s,null,null),e.createVNode(h,null,null)])])}});N.install=(t,o={})=>{if(Object.keys(o).length){const{props:n}=N,{language:d,align:i,info:c,border:l,pageNumber:b,first:u,last:p,pageSizeMenu:P}=o;d&&(n.language.default=d),i&&(n.align.default=i),typeof c=="boolean"&&(n.info.default=c),typeof l=="boolean"&&(n.border.default=l),typeof b=="boolean"&&(n.pageNumber.default=b),typeof u=="boolean"&&(n.first.default=u),typeof p=="boolean"&&(n.last.default=p),typeof P<"u"&&(n.pageSizeMenu.default=P)}t.component(N.name,N)},m.PaginationBar=N,m.default=N,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
+ (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.VPage={},o.Vue))})(this,function(o,e){"use strict";const I=[10,20,50,100],y=0,[X,Y,F]=["left","center","right"],d=Symbol("pagination"),[T,m,v,z,j]=["cn","en","de","jp","pt"],V={[T]:{pageLength:"每页记录数",pageInfo:"第 #pageNumber#/#totalPage# 页(共#totalRow#条记录)",first:"首页",last:"尾页",all:"全部"},[m]:{pageLength:"Per page",pageInfo:"Page #pageNumber#/#totalPage# (total #totalRow# records)",first:"First",last:"Last",all:"All"},[v]:{pageLength:"Seitenlänge",pageInfo:"Aktuell #pageNumber#/#totalPage# (gesamt #totalRow# Aufzeichnungen)",first:"Zuerst",last:"Letzte",all:"Alle"},[z]:{pageLength:"ページごとの記録数",pageInfo:"現在の第 #pageNumber#/#totalPage# ページ(全部で #totalRow# 条の記録)",first:"トップページ",last:"尾のページ",all:"すべて"},[j]:{pageLength:"Resultados por página",pageInfo:"#pageNumber#/#totalPage# (total de #totalRow#)",first:"Início",last:"Fim",all:"Todos"}};function w(a,t,n){if(t<=n)return 1;const u=Math.floor(n/2),l=t-n+1,i=a-u;return i<1?1:i>l?l:i}function B(a,t,n){const u=w(a,t,n);return Array.from({length:n}).map((l,i)=>u+i).filter(l=>l>=1&&l<=t)}function O(a=m){const t=String(a).toLowerCase();return V[Object.hasOwn(V,t)?t:m]}const p=e.defineComponent({name:"PaginationBar",props:{modelValue:{type:Number,default:0},pageSize:{type:Number,default:10},totalRow:{type:Number,default:0},language:{type:String,default:m},align:{type:String,default:F},pageSizeMenu:{type:[Array],default:()=>I},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},border:{type:Boolean,default:!1},displayAll:{type:Boolean,default:!1},hideOnSinglePage:{type:Boolean,default:!1}},emits:["update:modelValue","update:pageSize","change"],setup(a,{emit:t,slots:n}){const{pageSizeMenu:u,totalRow:l}=e.toRefs(a),i=e.ref(0),P=e.ref(5),r=e.ref(a.pageSize??10),f=e.computed(()=>{const g=Array.from(Array.isArray(u.value)&&u.value.length>0?u.value:I);return r.value!==0&&!g.includes(r.value)&&g.push(r.value),g.sort((s,J)=>s-J)}),c=e.computed(()=>r.value===y?1:Math.ceil(l.value/r.value)),S=e.computed(()=>B(i.value,c.value,P.value)),H=e.computed(()=>({"v-pagination":!0,"v-pagination--right":a.align==="right","v-pagination--center":a.align==="center","v-pagination--disabled":a.disabled,"v-pagination--border":a.border,"v-pagination--circle":!a.border&&a.circle})),R=e.computed(()=>i.value===1),A=e.computed(()=>i.value===c.value);e.watch(()=>a.modelValue,_),e.watch(()=>a.pageSize,E);function _(g=1){if(a.disabled||typeof g!="number")return;let s=g<1?1:g;g>c.value&&c.value>0&&(s=c.value),s!==i.value&&(i.value=s,t("update:modelValue",i.value),L())}function E(g){if(typeof g=="number"&&!(g<0)&&g!==r.value){if(r.value=g,t("update:pageSize",r.value),i.value===1)return L();_(1)}}function L(){t("change",{pageNumber:i.value,pageSize:Number(r.value),totalPage:c.value})}return e.onMounted(()=>_(a.modelValue||1)),e.provide(d,{lang:O(a.language),pageSize:r,sizeList:f,pageNumbers:S,isFirst:R,isLast:A,current:i,totalPage:c,changePageNumber:_,changePageSize:E,...e.toRefs(a)}),()=>{var s;if(a.hideOnSinglePage&&c.value<=1)return null;const g={pageNumber:i.value,pageSize:r.value,totalPage:c.value,totalRow:l.value,isFirst:R.value,isLast:A.value};return e.createVNode("div",{class:H.value},[e.createVNode("ul",null,[(s=n==null?void 0:n.default)==null?void 0:s.call(n,g)])])}}});function h(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!e.isVNode(a)}function b(a,{slots:t}){var n;return e.createVNode("a",{href:"javascript:void(0)"},[(n=t==null?void 0:t.default)==null?void 0:n.call(t)])}function N({classes:a,pageNumberValue:t,name:n}){const{changePageNumber:u}=e.inject(d);return e.createVNode("li",{class:["v-pagination__item",...a]},[e.createVNode(b,{onClick:()=>u(t)},h(n)?n:{default:()=>[n]})])}function G(){const{lang:a,sizeList:t,pageSize:n,disabled:u,displayAll:l,changePageSize:i}=e.inject(d),P=()=>t.value.map(f=>e.createVNode("option",{key:f,value:f,selected:n.value===f},[f])),r=()=>l.value?e.createVNode("option",{value:y,selected:n.value===y},[a.all]):null;return e.createVNode("li",{class:"v-pagination__list"},[e.createVNode(b,null,{default:()=>[e.createVNode("span",null,[a.pageLength]),e.createVNode("select",{disabled:u.value,onChange:f=>i(Number(f.target.value))},[e.createVNode(P,null,null),e.createVNode(r,null,null)])]})])}function M(){const{lang:a,current:t,totalPage:n,totalRow:u}=e.inject(d),l=a.pageInfo.replace("#pageNumber#",t.value).replace("#totalPage#",n.value).replace("#totalRow#",u.value);return e.createVNode("li",{class:"v-pagination__info"},[e.createVNode(b,null,h(l)?l:{default:()=>[l]})])}function D(a,{slots:t}){return e.createVNode("li",{class:"v-pagination__slot"},[e.createVNode(b,null,{default:()=>{var n;return[(n=t==null?void 0:t.default)==null?void 0:n.call(t)]}})])}function U(){const{pageNumbers:a,current:t}=e.inject(d);return a.value.map(n=>e.createVNode(N,{key:n,classes:[{active:n===t.value}],pageNumberValue:n,name:n},null))}function Z(){const{isFirst:a,lang:t}=e.inject(d);return e.createVNode(N,{classes:["v-pagination__first",{disabled:a.value}],pageNumberValue:1,name:t.first},null)}function C(){const{isFirst:a,current:t}=e.inject(d);return e.createVNode(N,{classes:["v-pagination__previous",{disabled:a.value}],pageNumberValue:t.value-1,name:"«"},null)}function k(){const{isLast:a,current:t}=e.inject(d);return e.createVNode(N,{classes:["v-pagination__next",{disabled:a.value}],pageNumberValue:t.value+1,name:"»"},null)}function q(){const{isLast:a,totalPage:t,lang:n}=e.inject(d);return e.createVNode(N,{classes:["v-pagination__last",{disabled:a.value}],pageNumberValue:t.value,name:n.last},null)}p.install=(a,t={})=>{if(Object.keys(t).length){const{props:n}=p,{language:u,align:l,info:i,border:P,pageNumber:r,first:f,last:c,pageSizeMenu:S}=t;u&&(n.language.default=u),l&&(n.align.default=l),typeof i=="boolean"&&(n.info.default=i),typeof P=="boolean"&&(n.border.default=P),typeof r=="boolean"&&(n.pageNumber.default=r),typeof f=="boolean"&&(n.first.default=f),typeof c=="boolean"&&(n.last.default=c),typeof S<"u"&&(n.pageSizeMenu.default=S)}a.component(p.name,p)},o.PaginationBar=p,o.PaginationFirstPage=Z,o.PaginationInfo=M,o.PaginationLastPage=q,o.PaginationNextPage=k,o.PaginationPageNumbers=U,o.PaginationPageSizeOptions=G,o.PaginationPanel=D,o.PaginationPreviousPage=C,o.default=p,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "v-page",
3
3
  "description": "A simple pagination bar",
4
- "version": "3.2.1",
4
+ "version": "3.3.0",
5
5
  "author": "TerryZ <terry5@foxmail.com>",
6
6
  "type": "module",
7
7
  "files": [
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "https://github.com/TerryZ/v-page.git"
39
+ "url": "git+https://github.com/TerryZ/v-page.git"
40
40
  },
41
41
  "keywords": [
42
42
  "front-end",
@@ -50,23 +50,25 @@
50
50
  "vue": "^3.4.0"
51
51
  },
52
52
  "dependencies": {
53
- "vue": "^3.5.12"
53
+ "vue": "^3.5.13"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@rushstack/eslint-patch": "^1.10.4",
57
- "@vitejs/plugin-vue": "^5.1.4",
58
- "@vitejs/plugin-vue-jsx": "^4.0.1",
59
- "@vitest/coverage-v8": "^2.1.3",
57
+ "@vitejs/plugin-vue": "^5.2.1",
58
+ "@vitejs/plugin-vue-jsx": "^4.1.1",
59
+ "@vitest/coverage-v8": "^2.1.8",
60
60
  "@vue/eslint-config-standard": "^8.0.1",
61
61
  "@vue/test-utils": "^2.4.6",
62
62
  "bootstrap": "^5.3.3",
63
- "eslint": "^8.49.0",
64
- "eslint-plugin-vue": "^9.17.0",
63
+ "eslint": "^8.50.0",
64
+ "eslint-plugin-vue": "^9.32.0",
65
+ "postcss": "^8.4.49",
66
+ "autoprefixer": "^10.4.20",
65
67
  "jsdom": "^25.0.1",
66
- "sass": "^1.80.2",
67
- "typescript": "^5.6.3",
68
- "vite": "^5.4.9",
68
+ "sass": "^1.83.0",
69
+ "typescript": "^5.7.2",
70
+ "vite": "^6.0.5",
69
71
  "vite-plugin-css-injected-by-js": "^3.5.2",
70
- "vitest": "^2.1.3"
72
+ "vitest": "^2.1.8"
71
73
  }
72
74
  }
package/types/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export declare interface PageSlotData {
23
23
  /**
24
24
  * Pagination plugin for Vue
25
25
  */
26
- declare interface Props {
26
+ declare interface PaginationProps {
27
27
  /**
28
28
  * The number of current page
29
29
  */
@@ -47,11 +47,6 @@ declare interface Props {
47
47
  * @default [10, 20, 50, 100]
48
48
  */
49
49
  pageSizeMenu?: number[]
50
- /**
51
- * Whether to display page size list panel
52
- * @default true
53
- */
54
- pageSizeOptions?: boolean
55
50
  /**
56
51
  * Alignment direction
57
52
  * @default `right`
@@ -72,26 +67,6 @@ declare interface Props {
72
67
  * @default false
73
68
  */
74
69
  circle?: boolean
75
- /**
76
- * Whether to display page information panel
77
- * @default true
78
- */
79
- info?: boolean
80
- /**
81
- * Whether to display page number buttons
82
- * @default true
83
- */
84
- pageNumber?: boolean
85
- /**
86
- * Whether to display first page button
87
- * @default true
88
- */
89
- first?: boolean
90
- /**
91
- * Whether to display last page button
92
- * @default true
93
- */
94
- last?: boolean
95
70
  /**
96
71
  * Whether add `All` item in page length list
97
72
  * @default false
@@ -111,17 +86,50 @@ type EmitUpdatePageSize = (event: "update:pageSize", value: number) => void
111
86
  /** The event respond pageNumber or pageSize change */
112
87
  type EmitChange = (event: "change", value: PageInfo) => void
113
88
 
89
+ type ComponentProps = AllowedComponentProps & ComponentCustomProps & VNodeProps
90
+
114
91
  declare interface PaginationBar {
115
92
  new (): {
116
- $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & Props
93
+ $props: ComponentProps & PaginationProps
117
94
  $emit: EmitUpdateModelValue & EmitUpdatePageSize & EmitChange
118
95
  $slots: {
119
96
  default?: (defaultSlotData: PageSlotData) => VNode[]
120
97
  }
121
98
  }
122
99
  }
100
+ declare interface PaginationComponent {
101
+ new (): {
102
+ $props: ComponentProps
103
+ }
104
+ }
105
+ declare interface PaginationPanel {
106
+ new (): {
107
+ $props: ComponentProps
108
+ $slots: {
109
+ default?: () => VNode[]
110
+ }
111
+ }
112
+ }
123
113
  declare const PaginationBar: PaginationBar
114
+ declare const PaginationPageSizeOptions: PaginationComponent
115
+ declare const PaginationInfo: PaginationComponent
116
+ declare const PaginationPageNumbers: PaginationComponent
117
+ declare const PaginationFirstPage: PaginationComponent
118
+ declare const PaginationPreviousPage: PaginationComponent
119
+ declare const PaginationNextPage: PaginationComponent
120
+ declare const PaginationLastPage: PaginationComponent
121
+ declare const PaginationPanel: PaginationPanel
124
122
 
125
- export { PaginationBar }
123
+ export {
124
+ PaginationBar,
125
+ PaginationPageSizeOptions,
126
+ PaginationInfo,
127
+ PaginationPageNumbers,
128
+ PaginationFirstPage,
129
+ PaginationPreviousPage,
130
+ PaginationNextPage,
131
+ PaginationLastPage,
132
+ PaginationPanel
133
+ }
126
134
 
127
135
  export default PaginationBar