vft 0.0.429 → 0.0.430
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/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/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 +5 -59
- package/es/components/side-menu/types.d.ts +107 -0
- 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/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 +5 -59
- package/lib/components/side-menu/types.d.ts +107 -0
- 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 +5 -5
- package/tags.json +1 -1
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, getCurrentInstance as N, ref as h, computed as T, watchEffect as z, unref as n, onMounted as D, createElementBlock as y, openBlock as p, normalizeStyle as H, normalizeClass as K, createVNode as C, withCtx as R, Fragment as U, renderList as W, createBlock as F } from "vue";
|
|
2
2
|
import { VftTabs as j, VftTabPane as q } from "../tabs/index.js";
|
|
3
3
|
import { isClient as G } from "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
@@ -10,7 +10,7 @@ import { useNamespace as J } 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
|
-
import { useRouterHelper as O, getRouterKeyPath as
|
|
13
|
+
import { useRouterHelper as O, getRouterKeyPath as d, listenerRouteChange as Q } from "@vft/router";
|
|
14
14
|
import { useMultipleTabStore as X, useTabs as Y } from "@vft/store";
|
|
15
15
|
import { useRefs as Z } from "@vft/use";
|
|
16
16
|
import ee from "hotkeys-js";
|
|
@@ -19,9 +19,9 @@ import ae from "./tab-content.vue2.js";
|
|
|
19
19
|
import { initAffixTabs as ne, useTabsDrag as oe } from "./use/use-multiple-tabs.js";
|
|
20
20
|
import "../context-menu/context-menu.vue2.js";
|
|
21
21
|
import "../icon/index.js";
|
|
22
|
-
const ie =
|
|
22
|
+
const ie = P({
|
|
23
23
|
name: "vft-multiple-tabs"
|
|
24
|
-
}), we = /* @__PURE__ */
|
|
24
|
+
}), we = /* @__PURE__ */ P({
|
|
25
25
|
...ie,
|
|
26
26
|
props: {
|
|
27
27
|
tabsStyle: {},
|
|
@@ -30,40 +30,40 @@ const ie = _({
|
|
|
30
30
|
fixTabCount: {},
|
|
31
31
|
fixExtraScrollWidth: {}
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
33
|
+
setup(l) {
|
|
34
|
+
const k = J("multiple-tabs"), s = N().appContext.config.globalProperties.$router, c = ne(s), f = X(), i = h(""), r = h(0), b = h(), { go: v } = O(s), m = T(() => f.getTabList.filter((e) => !e.meta?.hideTab));
|
|
35
35
|
z(() => {
|
|
36
36
|
if (i.value) {
|
|
37
|
-
const e =
|
|
38
|
-
e === -1 ? r.value =
|
|
37
|
+
const e = m.value.findIndex((a) => d(a) === i.value);
|
|
38
|
+
e === -1 ? r.value = m.value?.length - 1 : r.value = e, r.value = r.value < c?.length ? c?.length - 1 : r.value;
|
|
39
39
|
}
|
|
40
40
|
}), G && te(() => {
|
|
41
|
-
b.value = n(
|
|
41
|
+
b.value = n(s.currentRoute);
|
|
42
42
|
}), Q(({ route: e }) => {
|
|
43
43
|
if (!e || e.meta?.hasTokenToRoot)
|
|
44
44
|
return;
|
|
45
|
-
const { meta: a = {} } = e, { currentActivePath: t, hideTab:
|
|
45
|
+
const { meta: a = {} } = e, { currentActivePath: t, hideTab: u } = a, I = u ? t : null, x = d(e);
|
|
46
46
|
if (i.value !== x && (i.value = x), I) {
|
|
47
|
-
let g =
|
|
48
|
-
g &&
|
|
47
|
+
let g = s.getRoutes().find((L) => L.path === t);
|
|
48
|
+
g && f.addTab(
|
|
49
49
|
g,
|
|
50
50
|
n(b),
|
|
51
51
|
r.value,
|
|
52
52
|
e
|
|
53
53
|
);
|
|
54
54
|
} else
|
|
55
|
-
|
|
55
|
+
f.addTab(n(e), n(b), r.value);
|
|
56
56
|
});
|
|
57
|
-
function
|
|
57
|
+
function _(e) {
|
|
58
58
|
if (i.value === e.paneName)
|
|
59
59
|
return;
|
|
60
|
-
const a =
|
|
60
|
+
const a = m.value[e.attrs.index];
|
|
61
61
|
i.value = e.paneName;
|
|
62
62
|
const t = a?.meta?.hideActiveRoute?.fullPath;
|
|
63
63
|
v(t || a.fullPath || a.path);
|
|
64
64
|
}
|
|
65
65
|
function w(e) {
|
|
66
|
-
|
|
66
|
+
f.closeTabByKey(e, s);
|
|
67
67
|
}
|
|
68
68
|
const { refs: M, setRefs: V } = Z();
|
|
69
69
|
function $(e) {
|
|
@@ -85,7 +85,7 @@ const ie = _({
|
|
|
85
85
|
"item-border-radius": `${o(5)} ${o(5)} 0 0`,
|
|
86
86
|
"item-border": "none"
|
|
87
87
|
};
|
|
88
|
-
return { ...S(e, "tabs"), ...
|
|
88
|
+
return { ...S(e, "tabs"), ...l.tabsStyle };
|
|
89
89
|
}), { closeCurrent: A } = Y(), E = {
|
|
90
90
|
...S(
|
|
91
91
|
{
|
|
@@ -94,39 +94,39 @@ const ie = _({
|
|
|
94
94
|
},
|
|
95
95
|
"menu"
|
|
96
96
|
),
|
|
97
|
-
...
|
|
97
|
+
...l.contextMenuStyle
|
|
98
98
|
};
|
|
99
99
|
return D(() => {
|
|
100
|
-
|
|
100
|
+
l.canDrag && oe(c), ee("command+e, ctrl+e", function() {
|
|
101
101
|
return A(), !1;
|
|
102
102
|
});
|
|
103
|
-
}), (e, a) => (
|
|
104
|
-
class: K(n(
|
|
103
|
+
}), (e, a) => (p(), y("div", {
|
|
104
|
+
class: K(n(k).b()),
|
|
105
105
|
style: H(B.value)
|
|
106
106
|
}, [
|
|
107
107
|
C(n(j), {
|
|
108
108
|
"show-bar": !1,
|
|
109
|
-
"fix-tab-count":
|
|
110
|
-
"fix-extra-scroll-width":
|
|
109
|
+
"fix-tab-count": l.fixTabCount,
|
|
110
|
+
"fix-extra-scroll-width": l.fixExtraScrollWidth,
|
|
111
111
|
modelValue: i.value,
|
|
112
112
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => i.value = t),
|
|
113
|
-
onTabClick:
|
|
113
|
+
onTabClick: _,
|
|
114
114
|
onTabRemove: w,
|
|
115
115
|
onTabContextMenu: $
|
|
116
116
|
}, {
|
|
117
117
|
default: R(() => [
|
|
118
|
-
(
|
|
119
|
-
key: n(
|
|
118
|
+
(p(!0), y(U, null, W(m.value, (t, u) => (p(), F(n(q), {
|
|
119
|
+
key: n(d)(t) + u,
|
|
120
120
|
closable: !t.meta?.affix,
|
|
121
|
-
index:
|
|
122
|
-
name: n(
|
|
121
|
+
index: u,
|
|
122
|
+
name: n(d)(t)
|
|
123
123
|
}, {
|
|
124
124
|
label: R(() => [
|
|
125
125
|
C(ae, {
|
|
126
126
|
"context-menu-style": E,
|
|
127
|
-
"affix-num": n(
|
|
127
|
+
"affix-num": n(c)?.length,
|
|
128
128
|
ref_for: !0,
|
|
129
|
-
ref: n(V)(
|
|
129
|
+
ref: n(V)(u),
|
|
130
130
|
"tab-item": t
|
|
131
131
|
}, null, 8, ["affix-num", "tab-item"])
|
|
132
132
|
]),
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouterHelper as
|
|
1
|
+
import { defineComponent as p, createElementBlock as n, openBlock as l, normalizeClass as r, unref as e, createElementVNode as o, toDisplayString as m, renderSlot as c } from "vue";
|
|
2
|
+
import { useRouterHelper as d } from "@vft/router";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as f } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
const
|
|
12
|
+
const u = p({
|
|
13
13
|
name: "vft-page-wrapper"
|
|
14
|
-
}),
|
|
15
|
-
...
|
|
14
|
+
}), x = /* @__PURE__ */ p({
|
|
15
|
+
...u,
|
|
16
16
|
props: {
|
|
17
17
|
title: {}
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const t =
|
|
21
|
-
return (
|
|
19
|
+
setup(s) {
|
|
20
|
+
const t = f("page-wrapper"), { getTitle: a } = d();
|
|
21
|
+
return (i, _) => (l(), n("div", {
|
|
22
22
|
class: r(e(t).b())
|
|
23
23
|
}, [
|
|
24
24
|
o("div", {
|
|
@@ -26,16 +26,16 @@ const f = s({
|
|
|
26
26
|
}, [
|
|
27
27
|
o("span", {
|
|
28
28
|
class: r(e(t).e("title"))
|
|
29
|
-
},
|
|
29
|
+
}, m(s.title || e(a)), 3)
|
|
30
30
|
], 2),
|
|
31
31
|
o("div", {
|
|
32
32
|
class: r(e(t).e("content"))
|
|
33
33
|
}, [
|
|
34
|
-
|
|
34
|
+
c(i.$slots, "default")
|
|
35
35
|
], 2)
|
|
36
36
|
], 2));
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
x as default
|
|
41
41
|
};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, ref as g, computed as v, createElementBlock as h, openBlock as _, unref as e, normalizeClass as t, createElementVNode as i, createVNode as b } 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 z } 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";
|
|
11
|
-
import { VftInput as
|
|
12
|
-
import { usePagination as
|
|
13
|
-
const
|
|
11
|
+
import { VftInput as C } from "../../input/index.js";
|
|
12
|
+
import { usePagination as V } from "../usePagination.js";
|
|
13
|
+
const x = ["disabled"], D = /* @__PURE__ */ f({
|
|
14
14
|
__name: "jumper",
|
|
15
15
|
props: {
|
|
16
16
|
size: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const n =
|
|
20
|
-
function
|
|
18
|
+
setup(r) {
|
|
19
|
+
const n = z("pagination"), { pageCount: l, disabled: s, currentPage: m, changeEvent: p } = V(), o = g(), u = v(() => o.value ?? m?.value);
|
|
20
|
+
function c(a) {
|
|
21
21
|
o.value = +a;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
a = Math.trunc(+a),
|
|
23
|
+
function d(a) {
|
|
24
|
+
a = Math.trunc(+a), p?.(+a), o.value = void 0;
|
|
25
25
|
}
|
|
26
|
-
return (a, E) => (_(),
|
|
26
|
+
return (a, E) => (_(), h("span", {
|
|
27
27
|
class: t(e(n).e("jump")),
|
|
28
28
|
disabled: e(s)
|
|
29
29
|
}, [
|
|
30
30
|
i("span", {
|
|
31
31
|
class: t([e(n).e("goto")])
|
|
32
32
|
}, "前往", 2),
|
|
33
|
-
|
|
34
|
-
size:
|
|
33
|
+
b(e(C), {
|
|
34
|
+
size: r.size,
|
|
35
35
|
class: t([e(n).e("editor"), e(n).is("in-pagination")]),
|
|
36
36
|
min: 1,
|
|
37
|
-
max: e(
|
|
37
|
+
max: e(l),
|
|
38
38
|
disabled: e(s),
|
|
39
|
-
"model-value":
|
|
39
|
+
"model-value": u.value,
|
|
40
40
|
"validate-event": !1,
|
|
41
41
|
type: "number",
|
|
42
|
-
"onUpdate:modelValue":
|
|
43
|
-
onChange:
|
|
42
|
+
"onUpdate:modelValue": c,
|
|
43
|
+
onChange: d
|
|
44
44
|
}, null, 8, ["size", "class", "max", "disabled", "model-value"]),
|
|
45
45
|
i("span", {
|
|
46
46
|
class: t([e(n).e("classifier")])
|
|
47
47
|
}, "页", 2)
|
|
48
|
-
], 10,
|
|
48
|
+
], 10, x));
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, computed as r, createElementBlock as a, openBlock as o, createCommentVNode as c, createVNode as s, toDisplayString as u, unref as m } from "vue";
|
|
2
2
|
import { VftIcon as b } from "../../icon/index.js";
|
|
3
|
-
const
|
|
3
|
+
const f = ["disabled", "aria-disabled"], x = { key: 0 }, p = /* @__PURE__ */ l({
|
|
4
4
|
__name: "next",
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean },
|
|
@@ -10,24 +10,24 @@ const p = ["disabled", "aria-disabled"], f = { key: 0 }, k = /* @__PURE__ */ d({
|
|
|
10
10
|
},
|
|
11
11
|
emits: ["click"],
|
|
12
12
|
setup(e) {
|
|
13
|
-
const
|
|
13
|
+
const t = r(
|
|
14
14
|
() => e.disabled || e.currentPage === e.pageCount || e.pageCount === 0
|
|
15
15
|
);
|
|
16
|
-
return (
|
|
16
|
+
return (i, n) => (o(), a("button", {
|
|
17
17
|
type: "button",
|
|
18
18
|
class: "btn-next",
|
|
19
|
-
disabled:
|
|
20
|
-
"aria-disabled":
|
|
21
|
-
onClick:
|
|
19
|
+
disabled: t.value,
|
|
20
|
+
"aria-disabled": t.value,
|
|
21
|
+
onClick: n[0] || (n[0] = (d) => i.$emit("click", d))
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
e.nextText ? (o(), a("span", x, u(e.nextText), 1)) : c("", !0),
|
|
24
|
+
s(m(b), {
|
|
25
25
|
icon: "icon-arrow-right",
|
|
26
26
|
size: 16
|
|
27
27
|
})
|
|
28
|
-
], 8,
|
|
28
|
+
], 8, f));
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
p as default
|
|
33
33
|
};
|
|
@@ -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
|
};
|