x-next 1.5.0 → 1.7.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/AI_USAGE.md +57 -4
- package/CHANGELOG.md +72 -0
- package/dist/_utils/color.d.ts +53 -0
- package/dist/components/color-picker/ColorPicker.d.ts +239 -0
- package/dist/components/color-picker/gradient-slider.d.ts +52 -0
- package/dist/components/color-picker/index.d.ts +238 -0
- package/dist/components/color-picker/panel.d.ts +721 -0
- package/dist/components/color-picker/sv-panel.d.ts +48 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/draggable/Draggable.d.ts +1 -1
- package/dist/components/draggable/index.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +6 -6
- package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +35 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
- package/dist/components/dropdown/index.d.ts +209 -29
- package/dist/components/form/FormItem.vue.d.ts +12 -12
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +24 -24
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
- package/dist/components/form-select/index.d.ts +66 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/grid/Row.vue.d.ts +3 -3
- package/dist/components/grid/index.d.ts +9 -9
- package/dist/components/heatmap/Heatmap.d.ts +311 -0
- package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
- package/dist/components/heatmap/index.d.ts +372 -0
- package/dist/components/heatmap/interface.d.ts +57 -0
- package/dist/components/image/Image.vue.d.ts +125 -17
- package/dist/components/image/ImagePreview.vue.d.ts +97 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
- package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
- package/dist/components/image/index.d.ts +712 -124
- package/dist/components/image/interface.d.ts +9 -1
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +3 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/network/Network.vue.d.ts +1 -1
- package/dist/components/network/index.d.ts +3 -3
- package/dist/components/network/utils.d.ts +2 -0
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popconfirm/src/popup.vue.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
- package/dist/components/skeleton/index.d.ts +6 -6
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +3 -3
- package/dist/components/spin/Spin.d.ts +38 -0
- package/dist/components/spin/index.d.ts +30 -0
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +372 -0
- package/dist/components/upload/context.d.ts +28 -0
- package/dist/components/upload/index.d.ts +656 -0
- package/dist/components/upload/interface.d.ts +110 -0
- package/dist/components/upload/props.d.ts +321 -0
- package/dist/components/upload/upload-list-item.d.ts +15 -0
- package/dist/components/upload/upload-list.d.ts +11 -0
- package/dist/components/upload/upload-picture-item.d.ts +20 -0
- package/dist/components/upload/upload-trigger.d.ts +8 -0
- package/dist/components/upload/utils.d.ts +48 -0
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +10 -4
- package/dist/es/_utils/color.js +73 -0
- package/dist/es/components/button/Button.js +2 -2
- package/dist/es/components/color-picker/ColorPicker.js +239 -0
- package/dist/es/components/color-picker/gradient-slider.js +79 -0
- package/dist/es/components/color-picker/index.js +8 -0
- package/dist/es/components/color-picker/panel.js +307 -0
- package/dist/es/components/color-picker/sv-panel.js +99 -0
- package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
- package/dist/es/components/form-input/Input.js +7 -7
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +2 -2
- package/dist/es/components/form-input-number/InputNumber.js +12 -12
- package/dist/es/components/heatmap/Heatmap.js +334 -0
- package/dist/es/components/heatmap/helpers/matrix.js +106 -0
- package/dist/es/components/heatmap/index.js +8 -0
- package/dist/es/components/image/Image.vue.js +55 -45
- package/dist/es/components/image/Image.vue2.js +113 -92
- package/dist/es/components/image/ImagePreview.vue.js +66 -53
- package/dist/es/components/image/ImagePreview.vue2.js +219 -171
- package/dist/es/components/image/ImagePreviewAction.js +12 -15
- package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
- package/dist/es/components/image/hooks/use-image-drag.js +16 -14
- package/dist/es/components/index.js +123 -117
- package/dist/es/components/menu/sub-menu-pop.vue2.js +12 -12
- package/dist/es/components/network/Network.vue2.js +72 -72
- package/dist/es/components/network/utils.js +44 -35
- package/dist/es/components/pagination/Pagination.js +113 -104
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
- package/dist/es/components/pagination/page-jumper.vue.js +13 -12
- package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
- package/dist/es/components/pagination/page-options.vue.js +4 -3
- package/dist/es/components/pagination/page-options.vue2.js +17 -15
- package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
- package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
- package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
- package/dist/es/components/spin/Spin.js +124 -60
- package/dist/es/components/table/Table.js +3 -1
- package/dist/es/components/trigger/Trigger.js +19 -19
- package/dist/es/components/upload/Upload.js +420 -0
- package/dist/es/components/upload/context.js +4 -0
- package/dist/es/components/upload/index.js +8 -0
- package/dist/es/components/upload/props.js +321 -0
- package/dist/es/components/upload/upload-list-item.js +138 -0
- package/dist/es/components/upload/upload-list.js +48 -0
- package/dist/es/components/upload/upload-picture-item.js +109 -0
- package/dist/es/components/upload/upload-trigger.js +89 -0
- package/dist/es/components/upload/utils.js +195 -0
- package/dist/es/icons/_self/empty-better.js +25 -8
- package/dist/es/icons/_self/upload-icons.js +103 -0
- package/dist/es/index.js +168 -162
- package/dist/es/locale/en-US.js +39 -1
- package/dist/es/locale/zh-CN.js +39 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/upload-icons.d.ts +523 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +60 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -0
- package/dist/style/color-picker.js +2 -0
- package/dist/style/date-picker.css +1 -1
- package/dist/style/empty.css +1 -1
- package/dist/style/form-checkbox.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/heatmap.css +1 -0
- package/dist/style/heatmap.js +2 -0
- package/dist/style/image.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/skeleton.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/upload.css +1 -0
- package/dist/style/upload.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
- package/volar.d.ts +3 -0
- package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as D, toRefs as G, ref as O, computed as g, reactive as H, watch as B, createVNode as n, mergeProps as b } from "vue";
|
|
2
|
+
import K from "./page-item.vue.js";
|
|
3
|
+
import L from "./page-item-step.vue.js";
|
|
4
|
+
import Q from "./page-item-ellipsis.vue.js";
|
|
5
|
+
import I from "./page-jumper.vue.js";
|
|
6
|
+
import U from "./page-options.vue.js";
|
|
7
7
|
import { isNumber as h } from "../../_utils/is.js";
|
|
8
|
-
import { useSize as
|
|
9
|
-
import { getClassNameMixin as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
const
|
|
8
|
+
import { useSize as W } from "../../_hooks/use-size.js";
|
|
9
|
+
import { getClassNameMixin as X } from "../../_utils/config.js";
|
|
10
|
+
import { useLocale as Y } from "../../locale/index.js";
|
|
11
|
+
const oe = /* @__PURE__ */ D({
|
|
12
12
|
name: "Pagination",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -168,20 +168,20 @@ const ne = /* @__PURE__ */ F({
|
|
|
168
168
|
}
|
|
169
169
|
},
|
|
170
170
|
emits: {
|
|
171
|
-
"update:current": (
|
|
172
|
-
"update:pageSize": (
|
|
171
|
+
"update:current": (t) => !0,
|
|
172
|
+
"update:pageSize": (t) => !0,
|
|
173
173
|
/**
|
|
174
174
|
* @zh 页码改变时触发
|
|
175
175
|
* @en Triggered when page number changes
|
|
176
176
|
* @param {number} current
|
|
177
177
|
*/
|
|
178
|
-
change: (
|
|
178
|
+
change: (t) => !0,
|
|
179
179
|
/**
|
|
180
180
|
* @zh 数据条数改变时触发
|
|
181
181
|
* @en Triggered when the number of data items changes
|
|
182
182
|
* @param {number} pageSize
|
|
183
183
|
*/
|
|
184
|
-
pageSizeChange: (
|
|
184
|
+
pageSizeChange: (t) => !0
|
|
185
185
|
},
|
|
186
186
|
/**
|
|
187
187
|
* @zh 分页按钮
|
|
@@ -210,37 +210,43 @@ const ne = /* @__PURE__ */ F({
|
|
|
210
210
|
* @slot total
|
|
211
211
|
* @binding {number} total
|
|
212
212
|
*/
|
|
213
|
-
setup(
|
|
214
|
-
emit:
|
|
215
|
-
slots:
|
|
213
|
+
setup(t, {
|
|
214
|
+
emit: f,
|
|
215
|
+
slots: o
|
|
216
216
|
}) {
|
|
217
|
-
const
|
|
218
|
-
t:
|
|
219
|
-
} =
|
|
220
|
-
disabled:
|
|
217
|
+
const c = X("pagination"), {
|
|
218
|
+
t: S
|
|
219
|
+
} = Y(), {
|
|
220
|
+
disabled: y,
|
|
221
221
|
pageItemStyle: A,
|
|
222
222
|
activePageItemStyle: E,
|
|
223
|
-
size:
|
|
224
|
-
} =
|
|
225
|
-
mergedSize:
|
|
226
|
-
} =
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
size: T
|
|
224
|
+
} = G(t), {
|
|
225
|
+
mergedSize: d
|
|
226
|
+
} = W(T), p = O(t.defaultCurrent), N = O(t.defaultPageSize), k = (e) => h(e) && Number.isFinite(e) && e > 0, w = (e, a = 10) => k(e) ? e : a, F = g(() => t.current ?? p.value), z = g(() => w(t.pageSize ?? N.value, w(t.defaultPageSize))), P = g(() => {
|
|
227
|
+
const e = t.total;
|
|
228
|
+
return h(e) && Number.isFinite(e) && e > 0 ? e : 0;
|
|
229
|
+
}), x = g(() => {
|
|
230
|
+
const e = F.value;
|
|
231
|
+
return h(e) && Number.isFinite(e) ? e : 1;
|
|
232
|
+
}), u = g(() => Math.max(Math.ceil(P.value / z.value), 1)), l = g(() => Math.min(Math.max(x.value, 1), u.value)), C = (e) => {
|
|
233
|
+
if (e !== l.value && h(e) && !t.disabled) {
|
|
234
|
+
const a = Math.min(Math.max(e, 1), u.value);
|
|
235
|
+
a !== l.value && (p.value = a, f("update:current", a), f("change", a));
|
|
230
236
|
}
|
|
231
|
-
}, J = (
|
|
232
|
-
k(
|
|
233
|
-
}, s =
|
|
237
|
+
}, J = (e) => {
|
|
238
|
+
k(e) && (N.value = e, f("update:pageSize", e), f("pageSizeChange", e));
|
|
239
|
+
}, s = H({
|
|
234
240
|
current: l,
|
|
235
241
|
style: A,
|
|
236
242
|
activeStyle: E,
|
|
237
|
-
onClick:
|
|
243
|
+
onClick: C
|
|
238
244
|
}), V = {
|
|
239
245
|
get current() {
|
|
240
246
|
return s.current;
|
|
241
247
|
},
|
|
242
248
|
get disabled() {
|
|
243
|
-
return
|
|
249
|
+
return y.value;
|
|
244
250
|
},
|
|
245
251
|
get style() {
|
|
246
252
|
return s.style;
|
|
@@ -251,12 +257,12 @@ const ne = /* @__PURE__ */ F({
|
|
|
251
257
|
get onClick() {
|
|
252
258
|
return s.onClick;
|
|
253
259
|
}
|
|
254
|
-
},
|
|
260
|
+
}, M = {
|
|
255
261
|
get current() {
|
|
256
262
|
return s.current;
|
|
257
263
|
},
|
|
258
264
|
get disabled() {
|
|
259
|
-
return
|
|
265
|
+
return y.value;
|
|
260
266
|
},
|
|
261
267
|
get style() {
|
|
262
268
|
return s.style;
|
|
@@ -271,6 +277,9 @@ const ne = /* @__PURE__ */ F({
|
|
|
271
277
|
get current() {
|
|
272
278
|
return s.current;
|
|
273
279
|
},
|
|
280
|
+
get disabled() {
|
|
281
|
+
return y.value;
|
|
282
|
+
},
|
|
274
283
|
get style() {
|
|
275
284
|
return s.style;
|
|
276
285
|
},
|
|
@@ -280,116 +289,116 @@ const ne = /* @__PURE__ */ F({
|
|
|
280
289
|
get pages() {
|
|
281
290
|
return u.value;
|
|
282
291
|
}
|
|
283
|
-
}, r = (
|
|
284
|
-
default:
|
|
285
|
-
}) :
|
|
292
|
+
}, r = (e, a = {}) => e === "more" ? n(Q, b(a, _), {
|
|
293
|
+
default: o["page-item-ellipsis"]
|
|
294
|
+
}) : e === "previous" ? n(L, b({
|
|
286
295
|
type: "previous"
|
|
287
|
-
}, a,
|
|
288
|
-
default:
|
|
289
|
-
}) :
|
|
296
|
+
}, a, M), {
|
|
297
|
+
default: o["page-item-step"]
|
|
298
|
+
}) : e === "next" ? n(L, b({
|
|
290
299
|
type: "next"
|
|
291
|
-
}, a,
|
|
292
|
-
default:
|
|
293
|
-
}) : n(
|
|
294
|
-
default:
|
|
295
|
-
}), R =
|
|
296
|
-
const
|
|
297
|
-
if (u.value <
|
|
300
|
+
}, a, M), {
|
|
301
|
+
default: o["page-item-step"]
|
|
302
|
+
}) : n(K, b(a, V), {
|
|
303
|
+
default: o["page-item"]
|
|
304
|
+
}), R = g(() => {
|
|
305
|
+
const e = [];
|
|
306
|
+
if (u.value < t.baseSize + t.bufferSize * 2)
|
|
298
307
|
for (let a = 1; a <= u.value; a++)
|
|
299
|
-
|
|
308
|
+
e.push(r("page", {
|
|
300
309
|
key: a,
|
|
301
310
|
pageNumber: a
|
|
302
311
|
}));
|
|
303
312
|
else {
|
|
304
|
-
let a = 1,
|
|
305
|
-
l.value > 2 +
|
|
313
|
+
let a = 1, m = u.value, i = !1, j = !1;
|
|
314
|
+
l.value > 2 + t.bufferSize && (i = !0, a = Math.min(l.value - t.bufferSize, u.value - 2 * t.bufferSize)), l.value < u.value - (t.bufferSize + 1) && (j = !0, m = Math.max(l.value + t.bufferSize, 2 * t.bufferSize + 1)), i && (e.push(r("page", {
|
|
306
315
|
key: 1,
|
|
307
316
|
pageNumber: 1
|
|
308
|
-
})),
|
|
317
|
+
})), e.push(r("more", {
|
|
309
318
|
key: "left-ellipsis-pager",
|
|
310
|
-
step: -(
|
|
319
|
+
step: -(t.bufferSize * 2 + 1)
|
|
311
320
|
})));
|
|
312
|
-
for (let v = a; v <=
|
|
313
|
-
|
|
321
|
+
for (let v = a; v <= m; v++)
|
|
322
|
+
e.push(r("page", {
|
|
314
323
|
key: v,
|
|
315
324
|
pageNumber: v
|
|
316
325
|
}));
|
|
317
|
-
|
|
326
|
+
j && (e.push(r("more", {
|
|
318
327
|
key: "right-ellipsis-pager",
|
|
319
|
-
step:
|
|
320
|
-
})),
|
|
328
|
+
step: t.bufferSize * 2 + 1
|
|
329
|
+
})), e.push(r("page", {
|
|
321
330
|
key: u.value,
|
|
322
331
|
pageNumber: u.value
|
|
323
332
|
})));
|
|
324
333
|
}
|
|
325
|
-
return
|
|
326
|
-
}),
|
|
327
|
-
class:
|
|
334
|
+
return e;
|
|
335
|
+
}), q = () => t.simple ? n("span", {
|
|
336
|
+
class: c.element("simple")
|
|
328
337
|
}, [r("previous", {
|
|
329
338
|
simple: !0
|
|
330
|
-
}), n(
|
|
331
|
-
disabled:
|
|
339
|
+
}), n(I, {
|
|
340
|
+
disabled: t.disabled,
|
|
332
341
|
current: l.value,
|
|
333
|
-
size:
|
|
342
|
+
size: d.value,
|
|
334
343
|
pages: u.value,
|
|
335
344
|
simple: !0,
|
|
336
|
-
onChange:
|
|
345
|
+
onChange: C
|
|
337
346
|
}, null), r("next", {
|
|
338
347
|
simple: !0
|
|
339
348
|
})]) : n("ul", {
|
|
340
|
-
class:
|
|
341
|
-
}, [r("previous"), R.value,
|
|
349
|
+
class: c.element("list")
|
|
350
|
+
}, [r("previous"), R.value, t.showMore && r("more", {
|
|
342
351
|
key: "more",
|
|
343
|
-
step:
|
|
352
|
+
step: t.bufferSize * 2 + 1
|
|
344
353
|
}), r("next")]);
|
|
345
|
-
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
i !== l.value && (p.value = i,
|
|
354
|
+
B(z, (e, a) => {
|
|
355
|
+
if (t.autoAdjust && e !== a && l.value > 1) {
|
|
356
|
+
const m = a * (l.value - 1) + 1, i = Math.ceil(m / e);
|
|
357
|
+
i !== l.value && (p.value = i, f("update:current", i), f("change", i));
|
|
349
358
|
}
|
|
350
|
-
}),
|
|
351
|
-
if (!
|
|
352
|
-
return;
|
|
353
|
-
const c = S.value;
|
|
354
|
-
if (!h(c) || c <= t)
|
|
359
|
+
}), B(u, (e, a) => {
|
|
360
|
+
if (!t.autoAdjust || e === a || x.value <= e)
|
|
355
361
|
return;
|
|
356
|
-
const i = Math.max(
|
|
357
|
-
p.value = i,
|
|
362
|
+
const i = Math.max(e, 1);
|
|
363
|
+
p.value = i, f("update:current", i), f("change", i);
|
|
358
364
|
});
|
|
359
|
-
const
|
|
360
|
-
[
|
|
361
|
-
[
|
|
365
|
+
const $ = g(() => [c.block, c.modifier(`size-${d.value}`), {
|
|
366
|
+
[c.modifier("simple")]: t.simple,
|
|
367
|
+
[c.modifier("disabled")]: t.disabled
|
|
362
368
|
}]);
|
|
363
369
|
return () => {
|
|
364
|
-
var
|
|
365
|
-
return
|
|
366
|
-
class:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}, [
|
|
370
|
-
|
|
371
|
-
})
|
|
372
|
-
total:
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
370
|
+
var e;
|
|
371
|
+
return t.hideOnSinglePage && u.value <= 1 ? null : n("div", {
|
|
372
|
+
class: $.value,
|
|
373
|
+
role: "navigation",
|
|
374
|
+
"aria-label": S("pagination.ariaLabel")
|
|
375
|
+
}, [t.showTotal && n("span", {
|
|
376
|
+
class: c.element("total")
|
|
377
|
+
}, [((e = o.total) == null ? void 0 : e.call(o, {
|
|
378
|
+
total: P.value
|
|
379
|
+
})) ?? S("pagination.total", {
|
|
380
|
+
total: P.value
|
|
381
|
+
})]), q(), t.showPageSize && n(U, {
|
|
382
|
+
disabled: t.disabled,
|
|
383
|
+
sizeOptions: t.pageSizeOptions,
|
|
384
|
+
pageSize: z.value,
|
|
385
|
+
size: d.value,
|
|
378
386
|
onChange: J,
|
|
379
|
-
selectProps:
|
|
380
|
-
}, null), !
|
|
381
|
-
disabled:
|
|
387
|
+
selectProps: t.pageSizeProps
|
|
388
|
+
}, null), !t.simple && t.showJumper && n(I, {
|
|
389
|
+
disabled: t.disabled,
|
|
382
390
|
current: l.value,
|
|
383
391
|
pages: u.value,
|
|
384
|
-
size:
|
|
385
|
-
|
|
392
|
+
size: d.value,
|
|
393
|
+
ariaLabel: S("pagination.jumpTo"),
|
|
394
|
+
onChange: C
|
|
386
395
|
}, {
|
|
387
|
-
"jumper-prepend":
|
|
388
|
-
"jumper-append":
|
|
396
|
+
"jumper-prepend": o["jumper-prepend"],
|
|
397
|
+
"jumper-append": o["jumper-append"]
|
|
389
398
|
})]);
|
|
390
399
|
};
|
|
391
400
|
}
|
|
392
401
|
});
|
|
393
402
|
export {
|
|
394
|
-
|
|
403
|
+
oe as default
|
|
395
404
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import l from "./page-item-ellipsis.vue2.js";
|
|
2
|
+
import { resolveComponent as i, openBlock as r, createElementBlock as s, normalizeClass as d, renderSlot as t, createVNode as p } from "vue";
|
|
3
3
|
import m from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
return
|
|
8
|
-
class:
|
|
4
|
+
const b = ["tabindex", "aria-label", "aria-disabled"];
|
|
5
|
+
function f(e, o, u, g, k, C) {
|
|
6
|
+
const a = i("icon-more");
|
|
7
|
+
return r(), s("li", {
|
|
8
|
+
class: d(e.cls),
|
|
9
9
|
role: "button",
|
|
10
|
-
tabindex:
|
|
10
|
+
tabindex: e.disabled ? -1 : 0,
|
|
11
11
|
"aria-label": e.t("pagination.jumpToPage", { page: e.nextPage }),
|
|
12
|
+
"aria-disabled": e.disabled || void 0,
|
|
12
13
|
onClick: o[0] || (o[0] = (...n) => e.handleClick && e.handleClick(...n)),
|
|
13
14
|
onKeydown: o[1] || (o[1] = (...n) => e.handleKeyDown && e.handleKeyDown(...n))
|
|
14
15
|
}, [
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
t(e.$slots, "default", {}, () => [
|
|
17
|
+
p(a)
|
|
17
18
|
])
|
|
18
|
-
], 42,
|
|
19
|
+
], 42, b);
|
|
19
20
|
}
|
|
20
|
-
const y = /* @__PURE__ */ m(
|
|
21
|
+
const y = /* @__PURE__ */ m(l, [["render", f]]);
|
|
21
22
|
export {
|
|
22
23
|
y as default
|
|
23
24
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as i } from "vue";
|
|
2
2
|
import p from "../../icons/_self/more-dot.js";
|
|
3
3
|
import { getLegalPage as u } from "./utils.js";
|
|
4
4
|
import { getClassNameMixin as f } from "../../_utils/config.js";
|
|
5
5
|
import { useLocale as d } from "../../locale/index.js";
|
|
6
|
-
const x =
|
|
6
|
+
const x = c({
|
|
7
7
|
name: "EllipsisPager",
|
|
8
8
|
components: {
|
|
9
9
|
IconMore: p
|
|
@@ -20,28 +20,32 @@ const x = l({
|
|
|
20
20
|
pages: {
|
|
21
21
|
type: Number,
|
|
22
22
|
required: !0
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
emits: ["click"],
|
|
26
|
-
setup(
|
|
27
|
-
const o = f("pagination--item"), { t: s } = d(),
|
|
28
|
-
() => u(
|
|
30
|
+
setup(e, { emit: a }) {
|
|
31
|
+
const o = f("pagination--item"), { t: s } = d(), n = i(
|
|
32
|
+
() => u(e.current + e.step, {
|
|
29
33
|
min: 1,
|
|
30
|
-
max:
|
|
34
|
+
max: e.pages
|
|
31
35
|
})
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
(
|
|
36
|
-
},
|
|
36
|
+
), r = (t) => {
|
|
37
|
+
e.disabled || a("click", n.value);
|
|
38
|
+
}, m = (t) => {
|
|
39
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), r());
|
|
40
|
+
}, l = i(() => [o.block, o.modifier("ellipsis")]);
|
|
37
41
|
return {
|
|
38
42
|
t: s,
|
|
39
43
|
className: o,
|
|
40
|
-
cls:
|
|
44
|
+
cls: l,
|
|
41
45
|
// 模板的 aria-label 需要它(点击后真正跳转到的页码)
|
|
42
|
-
nextPage:
|
|
43
|
-
handleClick:
|
|
44
|
-
handleKeyDown:
|
|
46
|
+
nextPage: n,
|
|
47
|
+
handleClick: r,
|
|
48
|
+
handleKeyDown: m
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
1
|
+
import d from "./page-jumper.vue2.js";
|
|
2
|
+
import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as r, createTextVNode as g, toDisplayString as p, createCommentVNode as l, createVNode as f, Fragment as N, createElementVNode as m } from "vue";
|
|
3
|
+
import b from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function V(e, o, $, C, h, j) {
|
|
5
5
|
const t = u("input-number");
|
|
6
6
|
return s(), n("span", {
|
|
7
7
|
class: a(e.cls)
|
|
@@ -10,13 +10,13 @@ function $(e, o, b, c, C, h) {
|
|
|
10
10
|
key: 0,
|
|
11
11
|
class: a([e.className.element("prepend"), e.className.modifier("text-goto")])
|
|
12
12
|
}, [
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
r(e.$slots, "jumper-prepend", {}, () => [
|
|
14
|
+
g(p(e.t("pagination.jumpTo")), 1)
|
|
15
15
|
])
|
|
16
16
|
], 2)),
|
|
17
|
-
|
|
17
|
+
f(t, {
|
|
18
18
|
modelValue: e.inputValue,
|
|
19
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
19
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => e.inputValue = i),
|
|
20
20
|
class: a(e.className.element("input")),
|
|
21
21
|
min: 1,
|
|
22
22
|
max: e.pages,
|
|
@@ -24,13 +24,14 @@ function $(e, o, b, c, C, h) {
|
|
|
24
24
|
disabled: e.disabled,
|
|
25
25
|
"hide-button": "",
|
|
26
26
|
formatter: e.handleFormatter,
|
|
27
|
+
"aria-label": e.ariaLabel || e.t("pagination.jumpTo"),
|
|
27
28
|
onChange: e.handleChange
|
|
28
|
-
}, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "onChange"]),
|
|
29
|
+
}, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "aria-label", "onChange"]),
|
|
29
30
|
e.$slots["jumper-append"] ? (s(), n("span", {
|
|
30
31
|
key: 1,
|
|
31
32
|
class: a(e.className.element("append"))
|
|
32
33
|
}, [
|
|
33
|
-
|
|
34
|
+
r(e.$slots, "jumper-append")
|
|
34
35
|
], 2)) : l("", !0),
|
|
35
36
|
e.simple ? (s(), n(N, { key: 2 }, [
|
|
36
37
|
m("span", {
|
|
@@ -38,11 +39,11 @@ function $(e, o, b, c, C, h) {
|
|
|
38
39
|
}, "/", 2),
|
|
39
40
|
m("span", {
|
|
40
41
|
class: a(e.className.element("total-page"))
|
|
41
|
-
},
|
|
42
|
+
}, p(e.pages), 3)
|
|
42
43
|
], 64)) : l("", !0)
|
|
43
44
|
], 2);
|
|
44
45
|
}
|
|
45
|
-
const z = /* @__PURE__ */
|
|
46
|
+
const z = /* @__PURE__ */ b(d, [["render", V]]);
|
|
46
47
|
export {
|
|
47
48
|
z as default
|
|
48
49
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as l, ref as c, watch as p, computed as d, nextTick as f } from "vue";
|
|
2
2
|
import { InputNumber as g } from "../form-input-number/index.js";
|
|
3
3
|
import { getClassNameMixin as N } from "../../_utils/config.js";
|
|
4
|
-
import { useLocale as
|
|
5
|
-
const
|
|
4
|
+
import { useLocale as b } from "../../locale/index.js";
|
|
5
|
+
const S = l({
|
|
6
6
|
name: "PageJumper",
|
|
7
7
|
components: {
|
|
8
8
|
InputNumber: g
|
|
@@ -27,13 +27,16 @@ const x = l({
|
|
|
27
27
|
size: {
|
|
28
28
|
type: String
|
|
29
29
|
},
|
|
30
|
+
ariaLabel: {
|
|
31
|
+
type: String
|
|
32
|
+
},
|
|
30
33
|
onChange: {
|
|
31
34
|
type: Function
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
emits: ["change"],
|
|
35
38
|
setup(e, { emit: i }) {
|
|
36
|
-
const a = N("pagination--jumper"), { t: o } =
|
|
39
|
+
const a = N("pagination--jumper"), { t: o } = b(), t = c(e.simple ? e.current : void 0), m = (n) => {
|
|
37
40
|
const r = parseInt(n.toString(), 10);
|
|
38
41
|
return Number.isNaN(r) ? void 0 : String(r);
|
|
39
42
|
}, s = (n) => {
|
|
@@ -64,5 +67,5 @@ const x = l({
|
|
|
64
67
|
}
|
|
65
68
|
});
|
|
66
69
|
export {
|
|
67
|
-
|
|
70
|
+
S as default
|
|
68
71
|
};
|
|
@@ -6,12 +6,13 @@ function m(e, d, c, f, u, g) {
|
|
|
6
6
|
return a(), l("span", {
|
|
7
7
|
class: r(e.className.block)
|
|
8
8
|
}, [
|
|
9
|
-
p(o, t({
|
|
9
|
+
p(o, t(e.selectProps, {
|
|
10
10
|
"model-value": e.pageSize,
|
|
11
11
|
options: e.options,
|
|
12
12
|
size: e.size,
|
|
13
|
-
disabled: e.disabled
|
|
14
|
-
|
|
13
|
+
disabled: e.disabled,
|
|
14
|
+
onChange: e.handleChange
|
|
15
|
+
}), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
|
|
15
16
|
], 2);
|
|
16
17
|
}
|
|
17
18
|
const b = /* @__PURE__ */ i(s, [["render", m]]);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { getClassNameMixin as
|
|
4
|
-
import { useLocale as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as r, computed as m } from "vue";
|
|
2
|
+
import { Select as c } from "../form-select/index.js";
|
|
3
|
+
import { getClassNameMixin as g } from "../../_utils/config.js";
|
|
4
|
+
import { useLocale as f } from "../../locale/index.js";
|
|
5
|
+
import { isNumber as u } from "../../_utils/is.js";
|
|
6
|
+
const y = r({
|
|
6
7
|
name: "PageOptions",
|
|
7
8
|
components: {
|
|
8
|
-
Select:
|
|
9
|
+
Select: c
|
|
9
10
|
},
|
|
10
11
|
props: {
|
|
11
12
|
sizeOptions: {
|
|
@@ -25,16 +26,17 @@ const u = p({
|
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
emits: ["change"],
|
|
28
|
-
setup(
|
|
29
|
-
const o =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
setup(i, { emit: n }) {
|
|
30
|
+
const o = g("pagination--options"), { t: s } = f(), a = m(() => {
|
|
31
|
+
const e = i.sizeOptions.slice();
|
|
32
|
+
return u(i.pageSize) && i.pageSize > 0 && !e.includes(i.pageSize) && (e.push(i.pageSize), e.sort((t, p) => t - p)), e.map((t) => ({
|
|
33
|
+
value: t,
|
|
34
|
+
label: s("pagination.pageSizeOption", { size: t })
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
35
37
|
return {
|
|
36
38
|
className: o,
|
|
37
|
-
options:
|
|
39
|
+
options: a,
|
|
38
40
|
handleChange: (e) => {
|
|
39
41
|
typeof e == "number" && Number.isFinite(e) && e > 0 && n("change", e);
|
|
40
42
|
}
|
|
@@ -42,5 +44,5 @@ const u = p({
|
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
y as default
|
|
46
48
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import r from "./Skeleton.vue2.js";
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { openBlock as s, createElementBlock as t, normalizeClass as n, renderSlot as e } from "vue";
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const l = ["aria-busy"];
|
|
5
|
+
function i(o, d, c, p, f, m) {
|
|
6
|
+
return s(), t("div", {
|
|
7
|
+
class: n(o.cls),
|
|
8
|
+
"aria-busy": o.loading ? "true" : void 0
|
|
7
9
|
}, [
|
|
8
|
-
|
|
9
|
-
],
|
|
10
|
+
o.loading ? e(o.$slots, "default", { key: 0 }) : e(o.$slots, "content", { key: 1 })
|
|
11
|
+
], 10, l);
|
|
10
12
|
}
|
|
11
|
-
const
|
|
13
|
+
const k = /* @__PURE__ */ a(r, [["render", i]]);
|
|
12
14
|
export {
|
|
13
|
-
|
|
15
|
+
k as default
|
|
14
16
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import t from "./SkeletonLine.vue2.js";
|
|
2
|
-
import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as
|
|
3
|
-
import
|
|
4
|
-
function p(e, u, f,
|
|
2
|
+
import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as i, normalizeStyle as m } from "vue";
|
|
3
|
+
import c from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function p(e, u, f, d, _, k) {
|
|
5
5
|
return r(), l("ul", {
|
|
6
|
-
class: n(e.className.block)
|
|
6
|
+
class: n(e.className.block),
|
|
7
|
+
"aria-hidden": "true"
|
|
7
8
|
}, [
|
|
8
|
-
(r(!0), l(a, null,
|
|
9
|
+
(r(!0), l(a, null, i(e.lines, (o, s) => (r(), l("li", {
|
|
9
10
|
key: s,
|
|
10
11
|
class: n(e.className.element("row")),
|
|
11
|
-
style:
|
|
12
|
+
style: m(o)
|
|
12
13
|
}, null, 6))), 128))
|
|
13
14
|
], 2);
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const z = /* @__PURE__ */ c(t, [["render", p]]);
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
z as default
|
|
18
19
|
};
|