vft 0.0.89 → 0.0.91
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/attributes.json +1 -1
- package/es/comp-resolver.js +20 -29
- package/es/components/affix/affix.vue2.js +34 -34
- package/es/components/alert/alert.vue2.js +44 -44
- package/es/components/avatar/avatar.vue2.js +28 -28
- package/es/components/backtop/backtop.vue2.js +11 -11
- package/es/components/button/button-group.vue2.js +8 -8
- package/es/components/button/button.vue2.js +39 -39
- package/es/components/card/card.vue2.js +20 -20
- package/es/components/check-tag/check-tag.vue2.js +14 -14
- package/es/components/checkbox/checkbox-button.vue2.js +61 -61
- package/es/components/checkbox/checkbox-group.vue2.js +27 -27
- package/es/components/checkbox/checkbox.vue2.js +81 -81
- package/es/components/clamp/clamp.vue2.js +59 -59
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +25 -25
- package/es/components/col/col.vue2.js +33 -33
- package/es/components/color-picker/color-picker.vue2.js +126 -126
- package/es/components/color-picker/components/alpha-slider.vue2.js +12 -12
- package/es/components/config-provider/config-provider.vue2.js +29 -29
- package/es/components/container/aside.vue2.js +9 -9
- package/es/components/container/container.vue2.js +11 -11
- package/es/components/container/footer.vue2.js +8 -8
- package/es/components/container/header.vue2.js +9 -9
- package/es/components/context-menu/context-menu.vue2.js +29 -29
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +53 -53
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +19 -19
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +32 -32
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +168 -168
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +89 -89
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +38 -38
- package/es/components/descriptions/description-item.vue2.js +16 -16
- package/es/components/descriptions/description.vue2.js +54 -54
- package/es/components/descriptions/descriptions-row.vue2.js +24 -24
- package/es/components/dialog/dialog-content.vue2.js +30 -30
- package/es/components/dialog/dialog.vue2.js +64 -64
- package/es/components/divider/divider.vue2.js +20 -20
- package/es/components/dropdown/dropdown.vue.js +2 -127
- package/es/components/dropdown/dropdown.vue2.js +234 -181
- package/es/components/dropdown/index.js +10 -17
- package/es/components/dropdown/style/css.js +5 -0
- package/es/components/dropdown/style/index.js +5 -0
- package/es/components/dropdown/tokens.js +1 -1
- package/es/components/empty/empty.vue2.js +27 -27
- package/es/components/exception/exception.vue2.js +19 -19
- package/es/components/footer-layout/footer-layout.vue2.js +1 -1
- package/es/components/form/form-item.vue2.js +77 -77
- package/es/components/form/form.vue2.js +37 -37
- package/es/components/full-screen/full-screen.vue2.js +26 -15
- package/es/components/header-layout/header-layout.vue2.js +27 -27
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +43 -43
- package/es/components/icon/icon.vue2.js +24 -24
- package/es/components/icon-text/icon-text.vue2.js +27 -27
- package/es/components/iframe-layout/iframe-layout.vue2.js +18 -18
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +73 -73
- package/es/components/image-viewer/image-viewer.vue2.js +109 -109
- package/es/components/index.js +145 -150
- package/es/components/input/input.vue2.js +175 -175
- package/es/components/link/link.vue2.js +27 -27
- package/es/components/list-cell/list-cell.vue2.js +8 -8
- package/es/components/logo/logo.vue2.js +27 -27
- package/es/components/md-container/md-container.vue2.js +1 -1
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +16 -16
- package/es/components/menu/menu-item-group.vue2.js +15 -15
- package/es/components/menu/menu-item.vue2.js +56 -56
- package/es/components/menu/menu.vue2.js +20 -20
- package/es/components/menu/sub-menu.vue2.js +16 -16
- package/es/components/message/message.vue2.js +81 -81
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +12 -12
- package/es/components/multiple-tabs/tab-content.vue2.js +16 -16
- package/es/components/overlay/overlay.vue2.js +14 -14
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +22 -22
- package/es/components/pagination/components/next.vue2.js +12 -12
- package/es/components/pagination/components/pager.vue2.js +75 -75
- package/es/components/pagination/components/prev.vue2.js +13 -13
- package/es/components/pagination/components/sizes.vue2.js +11 -11
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/pagination/pagination.vue2.js +28 -28
- package/es/components/popconfirm/popconfirm.vue2.js +50 -50
- package/es/components/popover/popover.vue2.js +44 -44
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +34 -34
- package/es/components/popper/popper.vue2.js +5 -5
- package/es/components/popper/trigger.vue2.js +48 -48
- package/es/components/qrcode/qrcode.vue2.js +35 -35
- package/es/components/radio/radio-button.vue2.js +28 -28
- package/es/components/radio/radio-group.vue2.js +26 -26
- package/es/components/radio/radio.vue2.js +44 -44
- package/es/components/result/result.vue2.js +10 -10
- package/es/components/router-view-content/router-view-content.vue2.js +20 -20
- package/es/components/row/row.vue2.js +19 -19
- package/es/components/scrollbar/bar.vue2.js +19 -19
- package/es/components/scrollbar/scrollbar.vue2.js +67 -67
- package/es/components/scrollbar/thumb.vue2.js +41 -41
- package/es/components/search/search.vue2.js +65 -65
- package/es/components/side-menu/side-menu.vue2.js +36 -36
- package/es/components/skeleton/skeleton-item.vue2.js +13 -13
- package/es/components/skeleton/skeleton.vue2.js +19 -19
- package/es/components/switch/switch.vue2.js +128 -128
- package/es/components/table/index.js +5 -3
- package/es/components/table/table.vue2.js +70 -70
- package/es/components/tabs/tab-bar.vue2.js +15 -15
- package/es/components/tabs/tab-nav.vue2.js +33 -33
- package/es/components/tabs/tab-pane.vue2.js +21 -21
- package/es/components/tabs/tabs.vue2.js +64 -66
- package/es/components/tag/tag.vue2.js +7 -7
- package/es/components/time-picker/common/picker.vue2.js +14 -14
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +60 -60
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +30 -30
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +57 -57
- package/es/components/time-select/time-select.vue2.js +29 -29
- package/es/components/tooltip/constants.js +1 -1
- package/es/components/tooltip/content.vue2.js +73 -73
- package/es/components/tooltip/tooltip.vue2.js +91 -91
- package/es/components/tooltip/trigger.vue2.js +33 -33
- package/es/components/verify-code/verify-code.vue2.js +25 -25
- package/es/index.js +208 -213
- package/es/package.json.js +1 -1
- package/lib/comp-resolver.cjs +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/container/aside.vue2.cjs +1 -1
- package/lib/components/container/container.vue2.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/descriptions/description-item.vue2.cjs +1 -1
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.cjs +1 -1
- package/lib/components/dropdown/style/css.cjs +1 -1
- package/lib/components/dropdown/style/index.cjs +1 -1
- package/lib/components/dropdown/tokens.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/exception/exception.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/arrow.vue2.cjs +1 -1
- package/lib/components/popper/content.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/index.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-bar.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/tag/tag.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/tooltip/constants.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/web-types.json +1 -1
- package/theme-style/vft-back-top.css +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as d, computed as l, openBlock as o, createElementBlock as i, toDisplayString as s, createCommentVNode as c, createVNode as u, unref as m } from "vue";
|
|
2
|
+
import { VftIcon as p } from "../../icon/index.js";
|
|
3
|
+
const b = ["disabled", "aria-disabled"], f = { key: 0 }, k = /* @__PURE__ */ d({
|
|
4
4
|
__name: "next",
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean },
|
|
7
7
|
currentPage: { default: 1 },
|
|
8
8
|
pageCount: { default: 50 },
|
|
9
|
-
nextText:
|
|
9
|
+
nextText: {}
|
|
10
10
|
},
|
|
11
11
|
emits: ["click"],
|
|
12
12
|
setup(e) {
|
|
13
|
-
const n =
|
|
13
|
+
const n = l(
|
|
14
14
|
() => e.disabled || e.currentPage === e.pageCount || e.pageCount === 0
|
|
15
15
|
);
|
|
16
|
-
return (
|
|
16
|
+
return (t, a) => (o(), i("button", {
|
|
17
17
|
type: "button",
|
|
18
18
|
class: "btn-next",
|
|
19
|
-
disabled:
|
|
20
|
-
"aria-disabled":
|
|
21
|
-
onClick: a[0] || (a[0] = (
|
|
19
|
+
disabled: n.value,
|
|
20
|
+
"aria-disabled": n.value,
|
|
21
|
+
onClick: a[0] || (a[0] = (r) => t.$emit("click", r))
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
m(
|
|
23
|
+
t.nextText ? (o(), i("span", f, s(t.nextText), 1)) : c("", !0),
|
|
24
|
+
u(m(p), {
|
|
25
25
|
icon: "ico-ep:arrow-right",
|
|
26
26
|
size: 16
|
|
27
27
|
})
|
|
28
|
-
], 8,
|
|
28
|
+
], 8, b));
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
@@ -1,145 +1,145 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
2
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as A, ref as c, computed as F, watchEffect as H, openBlock as i, createElementBlock as f, normalizeClass as d, unref as u, withKeys as I, createCommentVNode as v, createBlock as m, Fragment as V, renderList as z, toDisplayString as L } from "vue";
|
|
2
|
+
import { useNamespace as E } from "../../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "../../../hooks/use-z-index/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../../utils/ns-cover.js";
|
|
9
|
-
import { VftIcon as
|
|
9
|
+
import { VftIcon as b } from "../../icon/index.js";
|
|
10
10
|
const D = ["onKeyup"], O = ["aria-current", "tabindex"], S = ["tabindex"], j = ["aria-current", "tabindex"], G = ["tabindex"], J = ["aria-current", "tabindex"], _ = /* @__PURE__ */ A({
|
|
11
11
|
__name: "pager",
|
|
12
12
|
props: {
|
|
13
13
|
currentPage: { default: 1 },
|
|
14
|
-
pageCount:
|
|
14
|
+
pageCount: {},
|
|
15
15
|
pagerCount: { default: 7 },
|
|
16
16
|
disabled: { type: Boolean }
|
|
17
17
|
},
|
|
18
18
|
emits: ["change"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
const
|
|
19
|
+
setup(a, { emit: M }) {
|
|
20
|
+
const o = E("pager"), h = E("icon"), C = c(!1), P = c(!1), k = c(!1), y = c(!1), N = c(!1), w = c(!1), x = F(() => {
|
|
21
|
+
const e = (a.pagerCount - 1) / 2;
|
|
22
22
|
let t = !1, n = !1;
|
|
23
|
-
|
|
24
|
-
const
|
|
23
|
+
a.pageCount > a.pagerCount && (a.currentPage > a.pagerCount - e && (t = !0), a.currentPage < a.pageCount - e && (n = !0));
|
|
24
|
+
const l = [];
|
|
25
25
|
if (t && !n) {
|
|
26
|
-
const
|
|
27
|
-
for (let s =
|
|
28
|
-
|
|
26
|
+
const r = a.pageCount - (a.pagerCount - 2);
|
|
27
|
+
for (let s = r; s < a.pageCount; s++)
|
|
28
|
+
l.push(s);
|
|
29
29
|
} else if (!t && n)
|
|
30
|
-
for (let
|
|
31
|
-
|
|
30
|
+
for (let r = 2; r < a.pagerCount; r++)
|
|
31
|
+
l.push(r);
|
|
32
32
|
else if (t && n) {
|
|
33
|
-
const
|
|
34
|
-
for (let s =
|
|
35
|
-
|
|
33
|
+
const r = Math.floor(a.pagerCount / 2) - 1;
|
|
34
|
+
for (let s = a.currentPage - r; s <= a.currentPage + r; s++)
|
|
35
|
+
l.push(s);
|
|
36
36
|
} else
|
|
37
|
-
for (let
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
}), g =
|
|
37
|
+
for (let r = 2; r < a.pageCount; r++)
|
|
38
|
+
l.push(r);
|
|
39
|
+
return l;
|
|
40
|
+
}), g = F(() => a.disabled ? -1 : 0);
|
|
41
41
|
H(() => {
|
|
42
|
-
const
|
|
43
|
-
C.value = !1, P.value = !1,
|
|
42
|
+
const e = (a.pagerCount - 1) / 2;
|
|
43
|
+
C.value = !1, P.value = !1, a.pageCount > a.pagerCount && (a.currentPage > a.pagerCount - e && (C.value = !0), a.currentPage < a.pageCount - e && (P.value = !0));
|
|
44
44
|
});
|
|
45
|
-
function
|
|
46
|
-
|
|
45
|
+
function q(e = !1) {
|
|
46
|
+
a.disabled || (e ? k.value = !0 : y.value = !0);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
48
|
+
function $(e = !1) {
|
|
49
|
+
e ? N.value = !0 : w.value = !0;
|
|
50
50
|
}
|
|
51
|
-
function K(
|
|
52
|
-
const t =
|
|
51
|
+
function K(e) {
|
|
52
|
+
const t = e.target;
|
|
53
53
|
if (t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("number")) {
|
|
54
54
|
const n = Number(t.textContent);
|
|
55
|
-
n !==
|
|
55
|
+
n !== a.currentPage && M("change", n);
|
|
56
56
|
} else
|
|
57
|
-
t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("more") &&
|
|
57
|
+
t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("more") && B(e);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const t =
|
|
61
|
-
if (t.tagName.toLowerCase() === "ul" ||
|
|
59
|
+
function B(e) {
|
|
60
|
+
const t = e.target;
|
|
61
|
+
if (t.tagName.toLowerCase() === "ul" || a.disabled)
|
|
62
62
|
return;
|
|
63
63
|
let n = Number(t.textContent);
|
|
64
|
-
const
|
|
65
|
-
t.className.includes("more") && (t.className.includes("quickprev") ? n =
|
|
64
|
+
const l = a.pagerCount - 2;
|
|
65
|
+
t.className.includes("more") && (t.className.includes("quickprev") ? n = a.currentPage - l : t.className.includes("quicknext") && (n = a.currentPage + l)), Number.isNaN(+n) || (n < 1 && (n = 1), n > a.pageCount && (n = a.pageCount)), n !== a.currentPage && M("change", n);
|
|
66
66
|
}
|
|
67
|
-
return (
|
|
68
|
-
class: d(
|
|
69
|
-
onClick:
|
|
67
|
+
return (e, t) => (i(), f("ul", {
|
|
68
|
+
class: d(u(o).b()),
|
|
69
|
+
onClick: B,
|
|
70
70
|
onKeyup: I(K, ["enter"])
|
|
71
71
|
}, [
|
|
72
|
-
e.pageCount > 0 ? (
|
|
72
|
+
e.pageCount > 0 ? (i(), f("li", {
|
|
73
73
|
key: 0,
|
|
74
74
|
class: d([[
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
u(o).is("active", e.currentPage === 1),
|
|
76
|
+
u(o).is("disabled", e.disabled)
|
|
77
77
|
], "number"]),
|
|
78
78
|
"aria-current": e.currentPage === 1,
|
|
79
|
-
tabindex:
|
|
80
|
-
}, " 1 ", 10, O)) :
|
|
81
|
-
C.value ? (
|
|
79
|
+
tabindex: g.value
|
|
80
|
+
}, " 1 ", 10, O)) : v("", !0),
|
|
81
|
+
C.value ? (i(), f("li", {
|
|
82
82
|
key: 1,
|
|
83
83
|
class: d([
|
|
84
84
|
"more",
|
|
85
85
|
"btn-quickprev",
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
u(h).b(),
|
|
87
|
+
u(o).is("disabled", e.disabled)
|
|
88
88
|
]),
|
|
89
|
-
tabindex:
|
|
90
|
-
onMouseenter: t[0] || (t[0] = (n) =>
|
|
89
|
+
tabindex: g.value,
|
|
90
|
+
onMouseenter: t[0] || (t[0] = (n) => q(!0)),
|
|
91
91
|
onMouseleave: t[1] || (t[1] = (n) => k.value = !1),
|
|
92
|
-
onFocus: t[2] || (t[2] = (n) =>
|
|
93
|
-
onBlur: t[3] || (t[3] = (n) =>
|
|
92
|
+
onFocus: t[2] || (t[2] = (n) => $(!0)),
|
|
93
|
+
onBlur: t[3] || (t[3] = (n) => N.value = !1)
|
|
94
94
|
}, [
|
|
95
|
-
(k.value ||
|
|
95
|
+
(k.value || N.value) && !e.disabled ? (i(), m(u(b), {
|
|
96
96
|
key: 0,
|
|
97
97
|
icon: "ico-ep:d-arrow-left"
|
|
98
|
-
})) : (
|
|
98
|
+
})) : (i(), m(u(b), {
|
|
99
99
|
key: 1,
|
|
100
100
|
icon: "ico-ep:more-filled"
|
|
101
101
|
}))
|
|
102
|
-
], 42, S)) :
|
|
103
|
-
(
|
|
102
|
+
], 42, S)) : v("", !0),
|
|
103
|
+
(i(!0), f(V, null, z(x.value, (n) => (i(), f("li", {
|
|
104
104
|
key: n,
|
|
105
105
|
class: d([[
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
u(o).is("active", e.currentPage === n),
|
|
107
|
+
u(o).is("disabled", e.disabled)
|
|
108
108
|
], "number"]),
|
|
109
109
|
"aria-current": e.currentPage === n,
|
|
110
|
-
tabindex:
|
|
111
|
-
},
|
|
112
|
-
P.value ? (
|
|
110
|
+
tabindex: g.value
|
|
111
|
+
}, L(n), 11, j))), 128)),
|
|
112
|
+
P.value ? (i(), f("li", {
|
|
113
113
|
key: 2,
|
|
114
114
|
class: d([
|
|
115
115
|
"more",
|
|
116
116
|
"btn-quicknext",
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
u(h).b(),
|
|
118
|
+
u(o).is("disabled", e.disabled)
|
|
119
119
|
]),
|
|
120
|
-
tabindex:
|
|
121
|
-
onMouseenter: t[4] || (t[4] = (n) =>
|
|
122
|
-
onMouseleave: t[5] || (t[5] = (n) =>
|
|
123
|
-
onFocus: t[6] || (t[6] = (n) =>
|
|
124
|
-
onBlur: t[7] || (t[7] = (n) =>
|
|
120
|
+
tabindex: g.value,
|
|
121
|
+
onMouseenter: t[4] || (t[4] = (n) => q()),
|
|
122
|
+
onMouseleave: t[5] || (t[5] = (n) => y.value = !1),
|
|
123
|
+
onFocus: t[6] || (t[6] = (n) => $()),
|
|
124
|
+
onBlur: t[7] || (t[7] = (n) => w.value = !1)
|
|
125
125
|
}, [
|
|
126
|
-
(
|
|
126
|
+
(y.value || w.value) && !e.disabled ? (i(), m(u(b), {
|
|
127
127
|
key: 0,
|
|
128
128
|
icon: "ico-ep:d-arrow-right"
|
|
129
|
-
})) : (
|
|
129
|
+
})) : (i(), m(u(b), {
|
|
130
130
|
key: 1,
|
|
131
131
|
icon: "ico-ep:more-filled"
|
|
132
132
|
}))
|
|
133
|
-
], 42, G)) :
|
|
134
|
-
e.pageCount > 1 ? (
|
|
133
|
+
], 42, G)) : v("", !0),
|
|
134
|
+
e.pageCount > 1 ? (i(), f("li", {
|
|
135
135
|
key: 3,
|
|
136
136
|
class: d([[
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
u(o).is("active", e.currentPage === e.pageCount),
|
|
138
|
+
u(o).is("disabled", e.disabled)
|
|
139
139
|
], "number"]),
|
|
140
140
|
"aria-current": e.currentPage === e.pageCount,
|
|
141
|
-
tabindex:
|
|
142
|
-
},
|
|
141
|
+
tabindex: g.value
|
|
142
|
+
}, L(e.pageCount), 11, J)) : v("", !0)
|
|
143
143
|
], 42, D));
|
|
144
144
|
}
|
|
145
145
|
});
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as s, computed as d, openBlock as a, createElementBlock as n, toDisplayString as c, createCommentVNode as p, createVNode as u, unref as m } from "vue";
|
|
2
|
+
import { VftIcon as b } from "../../icon/index.js";
|
|
3
|
+
const f = ["disabled", "aria-disabled"], v = { key: 0 }, _ = /* @__PURE__ */ s({
|
|
4
4
|
__name: "prev",
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean },
|
|
7
7
|
currentPage: { default: 1 },
|
|
8
|
-
prevText:
|
|
8
|
+
prevText: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["click"],
|
|
11
11
|
setup(e, { emit: i }) {
|
|
12
|
-
const
|
|
12
|
+
const t = d(
|
|
13
13
|
() => e.disabled || e.currentPage <= 1
|
|
14
14
|
);
|
|
15
|
-
return (
|
|
15
|
+
return (o, r) => (a(), n("button", {
|
|
16
16
|
type: "button",
|
|
17
17
|
class: "btn-prev",
|
|
18
|
-
disabled: t
|
|
19
|
-
"aria-disabled": t
|
|
20
|
-
onClick:
|
|
18
|
+
disabled: t.value,
|
|
19
|
+
"aria-disabled": t.value,
|
|
20
|
+
onClick: r[0] || (r[0] = (l) => i("click", l))
|
|
21
21
|
}, [
|
|
22
|
-
|
|
23
|
-
u(
|
|
22
|
+
o.prevText ? (a(), n("span", v, c(o.prevText), 1)) : p("", !0),
|
|
23
|
+
u(m(b), {
|
|
24
24
|
icon: "ico-ep:arrow-left",
|
|
25
25
|
size: 16
|
|
26
26
|
})
|
|
27
|
-
], 8,
|
|
27
|
+
], 8, f));
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
_ as default
|
|
32
32
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as p, ref as m, watch as t, computed as c, openBlock as
|
|
2
|
-
import { isEqual as
|
|
1
|
+
import { defineComponent as p, ref as m, watch as t, computed as c, openBlock as g, createElementBlock as z, normalizeClass as u, unref as f } from "vue";
|
|
2
|
+
import { isEqual as l } from "lodash";
|
|
3
3
|
import { useNamespace as S } from "../../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
5
5
|
import "../../../hooks/use-z-index/index.js";
|
|
@@ -10,23 +10,23 @@ import { usePagination as d } from "../usePagination.js";
|
|
|
10
10
|
const b = /* @__PURE__ */ p({
|
|
11
11
|
__name: "sizes",
|
|
12
12
|
props: {
|
|
13
|
-
pageSize:
|
|
13
|
+
pageSize: {},
|
|
14
14
|
pageSizes: { default: [10, 20, 30, 40, 50, 100] },
|
|
15
|
-
popperClass:
|
|
15
|
+
popperClass: {},
|
|
16
16
|
disabled: { type: Boolean },
|
|
17
|
-
size:
|
|
17
|
+
size: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["page-size-change"],
|
|
20
|
-
setup(e, { emit:
|
|
21
|
-
const
|
|
20
|
+
setup(e, { emit: s }) {
|
|
21
|
+
const n = S("pagination");
|
|
22
22
|
d();
|
|
23
23
|
const o = m(e.pageSize);
|
|
24
24
|
return t(
|
|
25
25
|
() => e.pageSizes,
|
|
26
26
|
(i, a) => {
|
|
27
|
-
if (!
|
|
27
|
+
if (!l(i, a) && Array.isArray(i)) {
|
|
28
28
|
const r = i.includes(e.pageSize) ? e.pageSize : e.pageSizes[0];
|
|
29
|
-
|
|
29
|
+
s("page-size-change", r);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
), t(
|
|
@@ -34,8 +34,8 @@ const b = /* @__PURE__ */ p({
|
|
|
34
34
|
(i) => {
|
|
35
35
|
o.value = i;
|
|
36
36
|
}
|
|
37
|
-
), c(() => e.pageSizes), (i, a) => (
|
|
38
|
-
class:
|
|
37
|
+
), c(() => e.pageSizes), (i, a) => (g(), z("span", {
|
|
38
|
+
class: u(f(n).e("sizes"))
|
|
39
39
|
}, " 暂无 ", 2));
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, openBlock as s, createElementBlock as i, normalizeClass as n, unref as t, toDisplayString as p } from "vue";
|
|
2
2
|
import { useNamespace as m } from "../../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
@@ -7,17 +7,17 @@ import "@vueuse/core";
|
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../../utils/ns-cover.js";
|
|
9
9
|
import { usePagination as l } from "../usePagination.js";
|
|
10
|
-
const c = ["disabled"], y = /* @__PURE__ */
|
|
10
|
+
const c = ["disabled"], y = /* @__PURE__ */ r({
|
|
11
11
|
__name: "total",
|
|
12
12
|
props: {
|
|
13
13
|
total: { default: 1e3 }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
18
|
-
class:
|
|
19
|
-
disabled: t(
|
|
20
|
-
}, p(
|
|
15
|
+
setup(d) {
|
|
16
|
+
const o = m("pagination"), { disabled: e } = l();
|
|
17
|
+
return (a, _) => (s(), i("span", {
|
|
18
|
+
class: n(t(o).e("total")),
|
|
19
|
+
disabled: t(e)
|
|
20
|
+
}, p(a.total), 11, c));
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
@@ -13,20 +13,20 @@ import O from "./components/prev.vue2.js";
|
|
|
13
13
|
import R from "./components/sizes.vue2.js";
|
|
14
14
|
import K from "./components/total.vue2.js";
|
|
15
15
|
import { vftPaginationKey as V } from "./usePagination.js";
|
|
16
|
-
const
|
|
16
|
+
const l = (
|
|
17
17
|
/* hoist-static*/
|
|
18
18
|
L("pagination")
|
|
19
19
|
), q = k({
|
|
20
|
-
name:
|
|
21
|
-
}),
|
|
20
|
+
name: l.b()
|
|
21
|
+
}), le = /* @__PURE__ */ k({
|
|
22
22
|
...q,
|
|
23
23
|
props: {
|
|
24
|
-
total:
|
|
25
|
-
pageSize:
|
|
26
|
-
defaultPageSize:
|
|
27
|
-
currentPage:
|
|
28
|
-
defaultCurrentPage:
|
|
29
|
-
pageCount:
|
|
24
|
+
total: {},
|
|
25
|
+
pageSize: {},
|
|
26
|
+
defaultPageSize: {},
|
|
27
|
+
currentPage: {},
|
|
28
|
+
defaultCurrentPage: {},
|
|
29
|
+
pageCount: {},
|
|
30
30
|
pagerCount: {
|
|
31
31
|
default: 7
|
|
32
32
|
},
|
|
@@ -39,10 +39,10 @@ const i = (
|
|
|
39
39
|
popperClass: {
|
|
40
40
|
default: ""
|
|
41
41
|
},
|
|
42
|
-
prevText:
|
|
43
|
-
prevIcon:
|
|
44
|
-
nextText:
|
|
45
|
-
nextIcon:
|
|
42
|
+
prevText: {},
|
|
43
|
+
prevIcon: {},
|
|
44
|
+
nextText: {},
|
|
45
|
+
nextIcon: {},
|
|
46
46
|
small: {
|
|
47
47
|
type: Boolean
|
|
48
48
|
},
|
|
@@ -88,7 +88,7 @@ const i = (
|
|
|
88
88
|
}), u = s(() => {
|
|
89
89
|
let a = 0;
|
|
90
90
|
return t(e.pageCount) ? a = e.pageCount : t(e.total) && (a = Math.max(1, Math.ceil(e.total / v.value))), a;
|
|
91
|
-
}),
|
|
91
|
+
}), i = s({
|
|
92
92
|
get() {
|
|
93
93
|
return t(e.currentPage) ? e.currentPage : p.value;
|
|
94
94
|
},
|
|
@@ -98,21 +98,21 @@ const i = (
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
M(u, (a) => {
|
|
101
|
-
|
|
101
|
+
i.value > a && (i.value = a);
|
|
102
102
|
});
|
|
103
103
|
function z(a) {
|
|
104
|
-
|
|
104
|
+
i.value = a;
|
|
105
105
|
}
|
|
106
106
|
function T(a) {
|
|
107
107
|
v.value = a;
|
|
108
108
|
const n = u.value;
|
|
109
|
-
|
|
109
|
+
i.value > n && (i.value = n);
|
|
110
110
|
}
|
|
111
111
|
function B() {
|
|
112
|
-
e.disabled || (
|
|
112
|
+
e.disabled || (i.value -= 1, g("prev-click", i.value));
|
|
113
113
|
}
|
|
114
114
|
function I() {
|
|
115
|
-
e.disabled || (
|
|
115
|
+
e.disabled || (i.value += 1, g("next-click", i.value));
|
|
116
116
|
}
|
|
117
117
|
function d(a, n) {
|
|
118
118
|
a && (a.props || (a.props = {}), a.class = [a.class, n].join(" "));
|
|
@@ -120,7 +120,7 @@ const i = (
|
|
|
120
120
|
return j(V, {
|
|
121
121
|
pageCount: u,
|
|
122
122
|
disabled: s(() => e.disabled),
|
|
123
|
-
currentPage:
|
|
123
|
+
currentPage: i,
|
|
124
124
|
changeEvent: z,
|
|
125
125
|
handleSizeChange: T
|
|
126
126
|
}), () => {
|
|
@@ -128,11 +128,11 @@ const i = (
|
|
|
128
128
|
if (!y.value || !e.layout || e.hideOnSinglePage && u.value <= 1)
|
|
129
129
|
return null;
|
|
130
130
|
const a = [], n = [], $ = r("div", {
|
|
131
|
-
class:
|
|
131
|
+
class: l.e("rightwrapper")
|
|
132
132
|
}, n), S = {
|
|
133
133
|
prev: r(O, {
|
|
134
134
|
disabled: e.disabled,
|
|
135
|
-
currentPage:
|
|
135
|
+
currentPage: i.value,
|
|
136
136
|
prevText: e.prevText,
|
|
137
137
|
prevIcon: e.prevIcon,
|
|
138
138
|
onClick: B
|
|
@@ -141,7 +141,7 @@ const i = (
|
|
|
141
141
|
size: e.small ? "small" : "default"
|
|
142
142
|
}),
|
|
143
143
|
pager: r(N, {
|
|
144
|
-
currentPage:
|
|
144
|
+
currentPage: i.value,
|
|
145
145
|
pageCount: u.value,
|
|
146
146
|
pagerCount: e.pagerCount,
|
|
147
147
|
onChange: z,
|
|
@@ -149,7 +149,7 @@ const i = (
|
|
|
149
149
|
}),
|
|
150
150
|
next: r(A, {
|
|
151
151
|
disabled: e.disabled,
|
|
152
|
-
currentPage:
|
|
152
|
+
currentPage: i.value,
|
|
153
153
|
pageCount: u.value,
|
|
154
154
|
nextText: e.nextText,
|
|
155
155
|
nextIcon: e.nextIcon,
|
|
@@ -174,16 +174,16 @@ const i = (
|
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
C ? n.push(S[f]) : a.push(S[f]);
|
|
177
|
-
}), d(a[0],
|
|
177
|
+
}), d(a[0], l.is("first")), d(a[a.length - 1], l.is("last")), C && n.length > 0 && (d(n[0], l.is("first")), d(n[n.length - 1], l.is("last")), a.push($)), r("div", {
|
|
178
178
|
role: "pagination",
|
|
179
179
|
"aria-label": "pagination",
|
|
180
|
-
class: [
|
|
181
|
-
[
|
|
180
|
+
class: [l.b(), l.is("background", e.background), {
|
|
181
|
+
[l.m("small")]: e.small
|
|
182
182
|
}]
|
|
183
183
|
}, a);
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
export {
|
|
188
|
-
|
|
188
|
+
le as default
|
|
189
189
|
};
|