vft 0.0.429 → 0.0.431
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/dist/index.css +1 -1
- package/es/components/alert/alert.vue2.js +38 -38
- package/es/components/autocomplete/autocomplete.vue2.js +82 -82
- package/es/components/avatar/avatar.vue2.js +23 -23
- package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
- package/es/components/button/button.vue2.js +37 -37
- package/es/components/card/card.vue2.js +19 -19
- package/es/components/carousel/carousel.vue2.js +75 -75
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader-panel/index.vue2.js +2 -2
- package/es/components/cascader-panel/menu.vue2.js +2 -2
- package/es/components/cascader-panel/node.vue2.js +3 -4
- package/es/components/checkbox/checkbox-button.vue2.js +52 -52
- package/es/components/checkbox/checkbox-group.vue2.js +26 -26
- package/es/components/checkbox/checkbox.vue2.js +57 -57
- package/es/components/clamp/clamp.vue2.js +14 -14
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
- package/es/components/col/col.vue2.js +20 -20
- package/es/components/color-picker/color-picker.vue2.js +126 -128
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +18 -18
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/description.vue2.js +44 -44
- package/es/components/descriptions/descriptions-row.vue2.js +12 -12
- package/es/components/dialog/dialog-content.vue2.js +31 -31
- package/es/components/dialog/dialog.vue2.js +46 -46
- package/es/components/divider/divider.vue2.js +19 -19
- package/es/components/drawer/drawer.vue2.js +41 -41
- package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
- package/es/components/dropdown/dropdown-item.vue2.js +28 -28
- package/es/components/dropdown/dropdown.vue2.js +124 -124
- package/es/components/form/form-item.vue2.js +71 -71
- package/es/components/header-layout/header-layout.vue2.js +25 -25
- package/es/components/icon/icon.vue2.js +15 -15
- package/es/components/icon-text/icon-text.vue2.js +28 -28
- package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +63 -63
- package/es/components/image-viewer/image-viewer.vue2.js +88 -88
- package/es/components/infinite-scroll/index.d.ts +1 -1
- package/es/components/input/input.vue2.js +112 -112
- package/es/components/input-number/input-number.vue2.js +100 -100
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +19 -19
- package/es/components/logo/logo.vue2.js +22 -22
- package/es/components/menu/menu-item-group.vue2.js +8 -8
- package/es/components/menu/menu-item.vue2.js +48 -48
- package/es/components/menu/sub-menu.vue2.js +33 -31
- package/es/components/message/message.vue2.js +66 -66
- package/es/components/modal/modal-footer-action.vue2.js +25 -25
- package/es/components/modal/modal.vue2.js +40 -40
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +18 -18
- package/es/components/pagination/components/next.vue2.js +11 -11
- package/es/components/pagination/components/pager.vue2.js +74 -74
- package/es/components/pagination/components/prev.vue2.js +9 -9
- package/es/components/pagination/components/sizes.vue2.js +18 -18
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/popconfirm/popconfirm.vue2.js +47 -47
- package/es/components/popover/popover.vue2.js +28 -28
- package/es/components/popper/trigger.vue2.js +9 -9
- package/es/components/progress/progress.vue2.js +87 -87
- package/es/components/qrcode/qrcode.vue2.js +31 -31
- package/es/components/radio/radio-button.vue2.js +17 -17
- package/es/components/radio/radio-group.vue2.js +35 -35
- package/es/components/router-view-content/router-view-content.vue2.js +25 -25
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
- package/es/components/row/row.vue2.js +5 -5
- package/es/components/scrollbar/bar.vue2.js +16 -16
- package/es/components/scrollbar/scrollbar.vue2.js +48 -48
- package/es/components/scrollbar/thumb.vue2.js +27 -27
- package/es/components/search/search.vue2.js +29 -29
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/select.vue.d.ts +1 -1
- package/es/components/side-menu/index.d.ts +2 -8
- package/es/components/side-menu/side-menu.vue.d.ts +8 -62
- package/es/components/side-menu/side-menu.vue2.js +48 -46
- package/es/components/side-menu/types.d.ts +107 -0
- package/es/components/side-menu/use-drag-line.d.ts +3 -1
- package/es/components/side-menu/use-drag-line.js +39 -28
- package/es/components/skeleton/skeleton-item.vue2.js +9 -9
- package/es/components/skeleton/skeleton.vue2.js +14 -14
- package/es/components/slider/button.vue2.js +54 -54
- package/es/components/slider/slider.vue2.js +106 -106
- package/es/components/steps/item.vue2.js +56 -56
- package/es/components/steps/steps.vue2.js +16 -16
- package/es/components/super-form/super-form-action.vue2.js +28 -28
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +108 -108
- package/es/components/table/field.d.ts +4 -4
- package/es/components/teleport/teleport.vue2.js +6 -6
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +20 -20
- package/es/components/tooltip/content.vue2.js +57 -57
- package/es/components/tooltip/tooltip.vue2.js +66 -66
- package/es/components/tooltip/trigger.vue2.js +42 -42
- package/es/components/tree/tree.vue2.js +72 -72
- package/es/components/upload/upload-content.vue2.js +85 -85
- package/es/components/upload/upload-list.vue2.js +70 -70
- package/es/components/upload/upload.vue2.js +86 -86
- package/es/components/verify-code/verify-code.vue2.js +18 -18
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.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/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader-panel/index.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.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/clamp-tooltip/clamp-tooltip.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/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.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.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- 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/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.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/infinite-scroll/index.d.ts +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.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/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.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/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.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/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +5 -5
- 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/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.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/select/index.d.ts +1 -1
- package/lib/components/select/select.vue.d.ts +1 -1
- package/lib/components/side-menu/index.d.ts +2 -8
- package/lib/components/side-menu/side-menu.vue.d.ts +8 -62
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +107 -0
- package/lib/components/side-menu/use-drag-line.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.d.ts +3 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/components/teleport/teleport.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/timeline/timeline-item.vue2.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/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/header-layout.scss +1 -1
- package/theme-style/src/menu.scss +7 -2
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/theme-style/src/side-menu.scss +0 -3
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as I, ref as
|
|
1
|
+
import { defineComponent as I, ref as f, computed as B, watchEffect as K, createElementBlock as c, openBlock as r, withKeys as V, normalizeClass as d, unref as u, createCommentVNode as m, createBlock as v, Fragment as z, renderList as D, toDisplayString as F } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../config-provider/hooks/use-global-config.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as L } from "../../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../../hooks/use-z-index/index.js";
|
|
@@ -18,129 +18,129 @@ const O = ["aria-current", "tabindex"], S = ["tabindex"], j = ["aria-current", "
|
|
|
18
18
|
disabled: { type: Boolean }
|
|
19
19
|
},
|
|
20
20
|
emits: ["change"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
let t = !1,
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
if (t && !
|
|
28
|
-
const
|
|
29
|
-
for (let s =
|
|
30
|
-
|
|
31
|
-
} else if (!t &&
|
|
32
|
-
for (let
|
|
33
|
-
|
|
34
|
-
else if (t &&
|
|
35
|
-
const
|
|
36
|
-
for (let s =
|
|
37
|
-
|
|
21
|
+
setup(e, { emit: E }) {
|
|
22
|
+
const w = E, l = L("pager"), M = L("icon"), C = f(!1), P = f(!1), k = f(!1), x = f(!1), N = f(!1), y = f(!1), A = B(() => {
|
|
23
|
+
const a = (e.pagerCount - 1) / 2;
|
|
24
|
+
let t = !1, n = !1;
|
|
25
|
+
e.pageCount > e.pagerCount && (e.currentPage > e.pagerCount - a && (t = !0), e.currentPage < e.pageCount - a && (n = !0));
|
|
26
|
+
const o = [];
|
|
27
|
+
if (t && !n) {
|
|
28
|
+
const i = e.pageCount - (e.pagerCount - 2);
|
|
29
|
+
for (let s = i; s < e.pageCount; s++)
|
|
30
|
+
o.push(s);
|
|
31
|
+
} else if (!t && n)
|
|
32
|
+
for (let i = 2; i < e.pagerCount; i++)
|
|
33
|
+
o.push(i);
|
|
34
|
+
else if (t && n) {
|
|
35
|
+
const i = Math.floor(e.pagerCount / 2) - 1;
|
|
36
|
+
for (let s = e.currentPage - i; s <= e.currentPage + i; s++)
|
|
37
|
+
o.push(s);
|
|
38
38
|
} else
|
|
39
|
-
for (let
|
|
40
|
-
|
|
41
|
-
return
|
|
42
|
-
}), g =
|
|
39
|
+
for (let i = 2; i < e.pageCount; i++)
|
|
40
|
+
o.push(i);
|
|
41
|
+
return o;
|
|
42
|
+
}), g = B(() => e.disabled ? -1 : 0);
|
|
43
43
|
K(() => {
|
|
44
|
-
const
|
|
45
|
-
C.value = !1, P.value = !1,
|
|
44
|
+
const a = (e.pagerCount - 1) / 2;
|
|
45
|
+
C.value = !1, P.value = !1, e.pageCount > e.pagerCount && (e.currentPage > e.pagerCount - a && (C.value = !0), e.currentPage < e.pageCount - a && (P.value = !0));
|
|
46
46
|
});
|
|
47
|
-
function
|
|
48
|
-
|
|
47
|
+
function q(a = !1) {
|
|
48
|
+
e.disabled || (a ? k.value = !0 : x.value = !0);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
50
|
+
function $(a = !1) {
|
|
51
|
+
a ? N.value = !0 : y.value = !0;
|
|
52
52
|
}
|
|
53
|
-
function H(
|
|
54
|
-
const t =
|
|
53
|
+
function H(a) {
|
|
54
|
+
const t = a.target;
|
|
55
55
|
if (t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("number")) {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
} else t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("more") &&
|
|
56
|
+
const n = Number(t.textContent);
|
|
57
|
+
n !== e.currentPage && w("change", n);
|
|
58
|
+
} else t.tagName.toLowerCase() === "li" && Array.from(t.classList).includes("more") && h(a);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const t =
|
|
62
|
-
if (t.tagName.toLowerCase() === "ul" ||
|
|
60
|
+
function h(a) {
|
|
61
|
+
const t = a.target;
|
|
62
|
+
if (t.tagName.toLowerCase() === "ul" || e.disabled)
|
|
63
63
|
return;
|
|
64
|
-
let
|
|
65
|
-
const
|
|
66
|
-
t.className.includes("more") && (t.className.includes("quickprev") ?
|
|
64
|
+
let n = Number(t.textContent);
|
|
65
|
+
const o = e.pagerCount - 2;
|
|
66
|
+
t.className.includes("more") && (t.className.includes("quickprev") ? n = e.currentPage - o : t.className.includes("quicknext") && (n = e.currentPage + o)), Number.isNaN(+n) || (n < 1 && (n = 1), n > e.pageCount && (n = e.pageCount)), n !== e.currentPage && w("change", n);
|
|
67
67
|
}
|
|
68
|
-
return (
|
|
69
|
-
class: d(
|
|
70
|
-
onClick:
|
|
68
|
+
return (a, t) => (r(), c("ul", {
|
|
69
|
+
class: d(u(l).b()),
|
|
70
|
+
onClick: h,
|
|
71
71
|
onKeyup: V(H, ["enter"])
|
|
72
72
|
}, [
|
|
73
|
-
e.pageCount > 0 ? (
|
|
73
|
+
e.pageCount > 0 ? (r(), c("li", {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: d([[
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
u(l).is("active", e.currentPage === 1),
|
|
77
|
+
u(l).is("disabled", e.disabled)
|
|
78
78
|
], "number"]),
|
|
79
79
|
"aria-current": e.currentPage === 1,
|
|
80
80
|
tabindex: g.value
|
|
81
81
|
}, " 1 ", 10, O)) : m("", !0),
|
|
82
|
-
C.value ? (
|
|
82
|
+
C.value ? (r(), c("li", {
|
|
83
83
|
key: 1,
|
|
84
84
|
class: d([
|
|
85
85
|
"more",
|
|
86
86
|
"btn-quickprev",
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
u(M).b(),
|
|
88
|
+
u(l).is("disabled", e.disabled)
|
|
89
89
|
]),
|
|
90
90
|
tabindex: g.value,
|
|
91
|
-
onMouseenter: t[0] || (t[0] = (
|
|
92
|
-
onMouseleave: t[1] || (t[1] = (
|
|
93
|
-
onFocus: t[2] || (t[2] = (
|
|
94
|
-
onBlur: t[3] || (t[3] = (
|
|
91
|
+
onMouseenter: t[0] || (t[0] = (n) => q(!0)),
|
|
92
|
+
onMouseleave: t[1] || (t[1] = (n) => k.value = !1),
|
|
93
|
+
onFocus: t[2] || (t[2] = (n) => $(!0)),
|
|
94
|
+
onBlur: t[3] || (t[3] = (n) => N.value = !1)
|
|
95
95
|
}, [
|
|
96
|
-
(k.value ||
|
|
96
|
+
(k.value || N.value) && !e.disabled ? (r(), v(u(b), {
|
|
97
97
|
key: 0,
|
|
98
98
|
icon: "icon-d-arrow-left"
|
|
99
|
-
})) : (
|
|
99
|
+
})) : (r(), v(u(b), {
|
|
100
100
|
key: 1,
|
|
101
101
|
icon: "icon-more-filled"
|
|
102
102
|
}))
|
|
103
103
|
], 42, S)) : m("", !0),
|
|
104
|
-
(
|
|
105
|
-
key:
|
|
104
|
+
(r(!0), c(z, null, D(A.value, (n) => (r(), c("li", {
|
|
105
|
+
key: n,
|
|
106
106
|
class: d([[
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
u(l).is("active", e.currentPage === n),
|
|
108
|
+
u(l).is("disabled", e.disabled)
|
|
109
109
|
], "number"]),
|
|
110
|
-
"aria-current": e.currentPage ===
|
|
110
|
+
"aria-current": e.currentPage === n,
|
|
111
111
|
tabindex: g.value
|
|
112
|
-
},
|
|
113
|
-
P.value ? (
|
|
112
|
+
}, F(n), 11, j))), 128)),
|
|
113
|
+
P.value ? (r(), c("li", {
|
|
114
114
|
key: 2,
|
|
115
115
|
class: d([
|
|
116
116
|
"more",
|
|
117
117
|
"btn-quicknext",
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
u(M).b(),
|
|
119
|
+
u(l).is("disabled", e.disabled)
|
|
120
120
|
]),
|
|
121
121
|
tabindex: g.value,
|
|
122
|
-
onMouseenter: t[4] || (t[4] = (
|
|
123
|
-
onMouseleave: t[5] || (t[5] = (
|
|
124
|
-
onFocus: t[6] || (t[6] = (
|
|
125
|
-
onBlur: t[7] || (t[7] = (
|
|
122
|
+
onMouseenter: t[4] || (t[4] = (n) => q()),
|
|
123
|
+
onMouseleave: t[5] || (t[5] = (n) => x.value = !1),
|
|
124
|
+
onFocus: t[6] || (t[6] = (n) => $()),
|
|
125
|
+
onBlur: t[7] || (t[7] = (n) => y.value = !1)
|
|
126
126
|
}, [
|
|
127
|
-
(
|
|
127
|
+
(x.value || y.value) && !e.disabled ? (r(), v(u(b), {
|
|
128
128
|
key: 0,
|
|
129
129
|
icon: "icon-d-arrow-right"
|
|
130
|
-
})) : (
|
|
130
|
+
})) : (r(), v(u(b), {
|
|
131
131
|
key: 1,
|
|
132
132
|
icon: "icon-more-filled"
|
|
133
133
|
}))
|
|
134
134
|
], 42, G)) : m("", !0),
|
|
135
|
-
e.pageCount > 1 ? (
|
|
135
|
+
e.pageCount > 1 ? (r(), c("li", {
|
|
136
136
|
key: 3,
|
|
137
137
|
class: d([[
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
u(l).is("active", e.currentPage === e.pageCount),
|
|
139
|
+
u(l).is("disabled", e.disabled)
|
|
140
140
|
], "number"]),
|
|
141
141
|
"aria-current": e.currentPage === e.pageCount,
|
|
142
142
|
tabindex: g.value
|
|
143
|
-
},
|
|
143
|
+
}, F(e.pageCount), 11, J)) : m("", !0)
|
|
144
144
|
], 34));
|
|
145
145
|
}
|
|
146
146
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as l, computed as d, createElementBlock as o, openBlock as a, createCommentVNode as s, createVNode as m, toDisplayString as u, unref as p } from "vue";
|
|
2
|
+
import { VftIcon as b } from "../../icon/index.js";
|
|
3
|
+
const f = ["disabled", "aria-disabled"], v = { key: 0 }, g = /* @__PURE__ */ l({
|
|
4
4
|
__name: "prev",
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean },
|
|
@@ -9,20 +9,20 @@ const v = ["disabled", "aria-disabled"], k = { key: 0 }, g = /* @__PURE__ */ d({
|
|
|
9
9
|
},
|
|
10
10
|
emits: ["click"],
|
|
11
11
|
setup(e, { emit: i }) {
|
|
12
|
-
const
|
|
13
|
-
return (
|
|
12
|
+
const r = i, t = d(() => e.disabled || e.currentPage <= 1);
|
|
13
|
+
return (k, n) => (a(), o("button", {
|
|
14
14
|
type: "button",
|
|
15
15
|
class: "btn-prev",
|
|
16
16
|
disabled: t.value,
|
|
17
17
|
"aria-disabled": t.value,
|
|
18
|
-
onClick: n[0] || (n[0] = (
|
|
18
|
+
onClick: n[0] || (n[0] = (c) => r("click", c))
|
|
19
19
|
}, [
|
|
20
|
-
|
|
21
|
-
m(b
|
|
20
|
+
e.prevText ? (a(), o("span", v, u(e.prevText), 1)) : s("", !0),
|
|
21
|
+
m(p(b), {
|
|
22
22
|
icon: "icon-arrow-left",
|
|
23
23
|
size: 16
|
|
24
24
|
})
|
|
25
|
-
], 8,
|
|
25
|
+
], 8, f));
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as z, watch as n, computed as d, createElementBlock as f, openBlock as S, normalizeClass as h, unref as
|
|
1
|
+
import { defineComponent as g, ref as z, watch as n, computed as d, createElementBlock as f, openBlock as S, normalizeClass as h, unref as s, createVNode as v } from "vue";
|
|
2
2
|
import { isEqual as C } from "lodash-es";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
@@ -10,7 +10,7 @@ import "@popperjs/core";
|
|
|
10
10
|
import "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { usePagination as y } from "../usePagination.js";
|
|
12
12
|
import { VftSelect as B } from "../../select/index.js";
|
|
13
|
-
const
|
|
13
|
+
const I = /* @__PURE__ */ g({
|
|
14
14
|
__name: "sizes",
|
|
15
15
|
props: {
|
|
16
16
|
pageSize: {},
|
|
@@ -20,14 +20,14 @@ const J = /* @__PURE__ */ g({
|
|
|
20
20
|
size: {}
|
|
21
21
|
},
|
|
22
22
|
emits: ["page-size-change"],
|
|
23
|
-
setup(a, { emit:
|
|
24
|
-
const
|
|
23
|
+
setup(a, { emit: o }) {
|
|
24
|
+
const l = o, r = b("pagination"), p = y(), i = z(a.pageSize);
|
|
25
25
|
n(
|
|
26
26
|
() => a.pageSizes,
|
|
27
|
-
(e,
|
|
28
|
-
if (!C(e,
|
|
29
|
-
const
|
|
30
|
-
|
|
27
|
+
(e, t) => {
|
|
28
|
+
if (!C(e, t) && Array.isArray(e)) {
|
|
29
|
+
const u = e.includes(a.pageSize) ? a.pageSize : a.pageSizes[0];
|
|
30
|
+
l("page-size-change", u);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
), n(
|
|
@@ -39,24 +39,24 @@ const J = /* @__PURE__ */ g({
|
|
|
39
39
|
const m = d(
|
|
40
40
|
() => a.pageSizes.map((e) => ({ label: e + "条/页", value: e }))
|
|
41
41
|
);
|
|
42
|
-
function
|
|
43
|
-
e !== i.value && (i.value = e,
|
|
42
|
+
function c(e) {
|
|
43
|
+
e !== i.value && (i.value = e, p.handleSizeChange?.(Number(e)));
|
|
44
44
|
}
|
|
45
|
-
return (e,
|
|
46
|
-
class: h(
|
|
45
|
+
return (e, t) => (S(), f("span", {
|
|
46
|
+
class: h(s(r).e("sizes"))
|
|
47
47
|
}, [
|
|
48
|
-
v(
|
|
48
|
+
v(s(B), {
|
|
49
49
|
"model-value": i.value,
|
|
50
|
-
disabled:
|
|
51
|
-
"popper-class":
|
|
52
|
-
size:
|
|
50
|
+
disabled: a.disabled,
|
|
51
|
+
"popper-class": a.popperClass,
|
|
52
|
+
size: a.size,
|
|
53
53
|
"validate-event": !1,
|
|
54
|
-
onChange:
|
|
54
|
+
onChange: c,
|
|
55
55
|
options: m.value
|
|
56
56
|
}, null, 8, ["model-value", "disabled", "popper-class", "size", "options"])
|
|
57
57
|
], 2));
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
I as default
|
|
62
62
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, createElementBlock as r, openBlock as n, unref as t, normalizeClass as s, toDisplayString as p } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../config-provider/hooks/use-global-config.js";
|
|
@@ -9,17 +9,17 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { usePagination as l } from "../usePagination.js";
|
|
12
|
-
const c = ["disabled"], D = /* @__PURE__ */
|
|
12
|
+
const c = ["disabled"], D = /* @__PURE__ */ i({
|
|
13
13
|
__name: "total",
|
|
14
14
|
props: {
|
|
15
15
|
total: { default: 0 }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
20
|
-
class: s(t(
|
|
21
|
-
disabled: t(
|
|
22
|
-
}, "共 " +
|
|
17
|
+
setup(o) {
|
|
18
|
+
const e = m("pagination"), { disabled: a } = l();
|
|
19
|
+
return (d, f) => (n(), r("span", {
|
|
20
|
+
class: s(t(e).e("total")),
|
|
21
|
+
disabled: t(a)
|
|
22
|
+
}, "共 " + p(o.total) + " 条", 11, c));
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as h, ref as
|
|
1
|
+
import { defineComponent as h, ref as N, computed as r, createBlock as d, openBlock as y, unref as t, mergeProps as w, withCtx as l, renderSlot as $, createCommentVNode as B, createElementVNode as a, normalizeClass as c, createTextVNode as f, normalizeStyle as b, toDisplayString as s, createVNode as T } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { addUnit as
|
|
4
|
+
import { addUnit as I } from "../../utils/helper.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { VftButton as
|
|
8
|
-
import { VftIcon as
|
|
9
|
-
import { VftTooltip as
|
|
10
|
-
import { useNamespace as
|
|
7
|
+
import { VftButton as x } from "../button/index.js";
|
|
8
|
+
import { VftIcon as P } from "../icon/index.js";
|
|
9
|
+
import { VftTooltip as S } from "../tooltip/index.js";
|
|
10
|
+
import { useNamespace as A } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
const
|
|
14
|
+
const R = h({
|
|
15
15
|
name: "VftPopconfirm"
|
|
16
16
|
}), W = /* @__PURE__ */ h({
|
|
17
|
-
...
|
|
17
|
+
...R,
|
|
18
18
|
props: {
|
|
19
19
|
title: {},
|
|
20
20
|
confirmButtonText: {},
|
|
@@ -30,77 +30,77 @@ const q = h({
|
|
|
30
30
|
width: { default: 150 }
|
|
31
31
|
},
|
|
32
32
|
emits: ["confirm", "cancel"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
width:
|
|
38
|
-
})),
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
() =>
|
|
44
|
-
),
|
|
45
|
-
return (
|
|
33
|
+
setup(e, { emit: C }) {
|
|
34
|
+
const i = e, m = C, n = A("popconfirm"), p = N(), u = () => {
|
|
35
|
+
p.value?.onClose?.();
|
|
36
|
+
}, k = r(() => ({
|
|
37
|
+
width: I(i.width)
|
|
38
|
+
})), v = (o) => {
|
|
39
|
+
m("confirm", o), u();
|
|
40
|
+
}, V = (o) => {
|
|
41
|
+
m("cancel", o), u();
|
|
42
|
+
}, g = r(
|
|
43
|
+
() => i.confirmButtonText || "确认"
|
|
44
|
+
), z = r(() => i.cancelButtonText || "取消");
|
|
45
|
+
return (o, q) => (y(), d(t(S), w({
|
|
46
46
|
ref_key: "tooltipRef",
|
|
47
|
-
ref:
|
|
47
|
+
ref: p,
|
|
48
48
|
trigger: "click",
|
|
49
49
|
effect: "light"
|
|
50
|
-
},
|
|
51
|
-
"popper-class": `${t(
|
|
52
|
-
"popper-style":
|
|
50
|
+
}, o.$attrs, {
|
|
51
|
+
"popper-class": `${t(n).namespace.value}-popover`,
|
|
52
|
+
"popper-style": k.value,
|
|
53
53
|
teleported: e.teleported,
|
|
54
54
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
55
55
|
"hide-after": e.hideAfter,
|
|
56
56
|
persistent: e.persistent
|
|
57
57
|
}), {
|
|
58
|
-
content:
|
|
59
|
-
|
|
60
|
-
class:
|
|
58
|
+
content: l(() => [
|
|
59
|
+
a("div", {
|
|
60
|
+
class: c(t(n).b())
|
|
61
61
|
}, [
|
|
62
|
-
|
|
63
|
-
class:
|
|
62
|
+
a("div", {
|
|
63
|
+
class: c(t(n).e("main"))
|
|
64
64
|
}, [
|
|
65
|
-
!e.hideIcon && e.icon ? (
|
|
65
|
+
!e.hideIcon && e.icon ? (y(), d(t(P), {
|
|
66
66
|
key: 0,
|
|
67
67
|
icon: e.icon,
|
|
68
68
|
size: 20,
|
|
69
|
-
class:
|
|
70
|
-
style:
|
|
71
|
-
}, null, 8, ["icon", "class", "style"])) :
|
|
72
|
-
|
|
69
|
+
class: c(t(n).e("icon")),
|
|
70
|
+
style: b({ color: e.iconColor })
|
|
71
|
+
}, null, 8, ["icon", "class", "style"])) : B("", !0),
|
|
72
|
+
f(" " + s(e.title), 1)
|
|
73
73
|
], 2),
|
|
74
|
-
|
|
75
|
-
class:
|
|
74
|
+
a("div", {
|
|
75
|
+
class: c(t(n).e("action"))
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
T(t(x), {
|
|
78
78
|
size: "small",
|
|
79
79
|
type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
|
|
80
80
|
text: e.cancelButtonType === "text",
|
|
81
|
-
onClick:
|
|
81
|
+
onClick: V
|
|
82
82
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
83
|
+
default: l(() => [
|
|
84
|
+
f(s(z.value), 1)
|
|
85
85
|
]),
|
|
86
86
|
_: 1
|
|
87
87
|
}, 8, ["type", "text"]),
|
|
88
|
-
|
|
88
|
+
T(t(x), {
|
|
89
89
|
size: "small",
|
|
90
90
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
91
91
|
text: e.confirmButtonType === "text",
|
|
92
|
-
onClick:
|
|
92
|
+
onClick: v
|
|
93
93
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
|
|
94
|
+
default: l(() => [
|
|
95
|
+
f(s(g.value), 1)
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
98
|
}, 8, ["type", "text"])
|
|
99
99
|
], 2)
|
|
100
100
|
], 2)
|
|
101
101
|
]),
|
|
102
|
-
default:
|
|
103
|
-
|
|
102
|
+
default: l(() => [
|
|
103
|
+
o.$slots.reference ? $(o.$slots, "reference", { key: 0 }) : B("", !0)
|
|
104
104
|
]),
|
|
105
105
|
_: 3
|
|
106
106
|
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftTooltip as
|
|
3
|
-
import { EVENT_CODE as
|
|
1
|
+
import { defineComponent as u, computed as o, ref as S, unref as l, createBlock as x, openBlock as f, mergeProps as R, withCtx as s, renderSlot as d, createCommentVNode as p, createElementBlock as T, normalizeClass as U, toDisplayString as c, createTextVNode as V } from "vue";
|
|
2
|
+
import { VftTooltip as $ } from "../tooltip/index.js";
|
|
3
|
+
import { EVENT_CODE as i } from "../../constants/aria.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
|
-
import { addUnit as
|
|
6
|
+
import { addUnit as N } from "../../utils/helper.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as O } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
const
|
|
13
|
+
const K = "onUpdate:visible", D = u({
|
|
14
14
|
name: "vft-popover"
|
|
15
|
-
}),
|
|
16
|
-
...
|
|
15
|
+
}), X = /* @__PURE__ */ u({
|
|
16
|
+
...D,
|
|
17
17
|
props: {
|
|
18
18
|
trigger: { default: "hover" },
|
|
19
19
|
placement: { default: "bottom" },
|
|
@@ -37,7 +37,7 @@ const D = "onUpdate:visible", H = m({
|
|
|
37
37
|
showArrow: { type: Boolean, default: !0 },
|
|
38
38
|
persistent: { type: Boolean, default: !0 },
|
|
39
39
|
appendTo: {},
|
|
40
|
-
triggerKeys: { default: () => [
|
|
40
|
+
triggerKeys: { default: () => [i.enter, i.numpadEnter, i.space] }
|
|
41
41
|
},
|
|
42
42
|
emits: [
|
|
43
43
|
"update:visible",
|
|
@@ -46,30 +46,30 @@ const D = "onUpdate:visible", H = m({
|
|
|
46
46
|
"after-enter",
|
|
47
47
|
"after-leave"
|
|
48
48
|
],
|
|
49
|
-
setup(
|
|
50
|
-
const
|
|
49
|
+
setup(e, { expose: m, emit: b }) {
|
|
50
|
+
const t = b, r = O("popover"), v = o(() => [K]), n = S(), g = o(() => l(n)?.popperRef), h = o(() => [
|
|
51
51
|
{
|
|
52
|
-
width:
|
|
52
|
+
width: N(e.width)
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
]), y =
|
|
54
|
+
e.popperStyle
|
|
55
|
+
]), y = o(() => [r.b(), e.popperClass, { [r.m("plain")]: !!e.content }]), w = o(() => e.transition === `${r.namespace.value}-fade-in-linear`), B = () => {
|
|
56
56
|
n.value?.hide();
|
|
57
57
|
}, k = () => {
|
|
58
|
-
|
|
58
|
+
t("before-enter");
|
|
59
59
|
}, C = () => {
|
|
60
|
-
|
|
60
|
+
t("before-leave");
|
|
61
61
|
}, A = () => {
|
|
62
|
-
|
|
62
|
+
t("after-enter");
|
|
63
63
|
}, E = () => {
|
|
64
|
-
|
|
64
|
+
t("update:visible", !1), t("after-leave");
|
|
65
65
|
};
|
|
66
|
-
return
|
|
66
|
+
return m({
|
|
67
67
|
popperRef: g,
|
|
68
68
|
hide: B
|
|
69
|
-
}), (
|
|
69
|
+
}), (a, H) => (f(), x(l($), R({
|
|
70
70
|
ref_key: "tooltipRef",
|
|
71
71
|
ref: n
|
|
72
|
-
},
|
|
72
|
+
}, a.$attrs, {
|
|
73
73
|
trigger: e.trigger,
|
|
74
74
|
"trigger-keys": e.triggerKeys,
|
|
75
75
|
placement: e.placement,
|
|
@@ -100,22 +100,22 @@ const D = "onUpdate:visible", H = m({
|
|
|
100
100
|
onHide: E
|
|
101
101
|
}), {
|
|
102
102
|
content: s(() => [
|
|
103
|
-
e.title ? (
|
|
103
|
+
e.title ? (f(), T("div", {
|
|
104
104
|
key: 0,
|
|
105
|
-
class:
|
|
105
|
+
class: U(l(r).e("title")),
|
|
106
106
|
role: "title"
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
}, c(e.title), 3)) : p("", !0),
|
|
108
|
+
d(a.$slots, "default", {}, () => [
|
|
109
|
+
V(c(e.content), 1)
|
|
110
110
|
])
|
|
111
111
|
]),
|
|
112
112
|
default: s(() => [
|
|
113
|
-
|
|
113
|
+
a.$slots.reference ? d(a.$slots, "reference", { key: 0 }) : p("", !0)
|
|
114
114
|
]),
|
|
115
115
|
_: 3
|
|
116
116
|
}, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]));
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
X as default
|
|
121
121
|
};
|