vft 0.0.507 → 0.0.509
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/dist/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +203 -202
- package/es/components/cascader-panel/menu.vue2.js +50 -49
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
- package/es/components/color-picker/color-picker.vue2.js +134 -133
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +5 -4
- package/es/components/config-provider/constants.d.ts +1 -0
- package/es/components/config-provider/constants.js +3 -2
- package/es/components/config-provider/hooks/use-global-config.js +33 -30
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/config-provider/index.js +6 -5
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
- package/es/components/date-picker/composables/use-month-range-header.js +15 -14
- package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
- package/es/components/date-time-select/date-time-select.vue2.js +39 -36
- package/es/components/dropdown/dropdown.vue2.js +68 -67
- package/es/components/empty/empty.vue2.js +39 -38
- package/es/components/full-screen/full-screen.vue2.js +18 -17
- package/es/components/image/image.vue2.js +60 -59
- package/es/components/image-viewer/image-viewer.vue2.js +45 -44
- package/es/components/index.js +161 -160
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/md-container/md-container.vue2.js +75 -74
- package/es/components/md-container/toc.js +37 -36
- package/es/components/modal/modal-footer-action.vue2.js +25 -24
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +16 -15
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
- package/es/components/pagination/components/jumper.vue2.js +29 -28
- package/es/components/pagination/components/sizes.vue2.js +21 -20
- package/es/components/pagination/components/total.vue2.js +11 -10
- package/es/components/popconfirm/popconfirm.vue2.js +40 -39
- package/es/components/search/search.vue2.js +79 -77
- package/es/components/select/useSelect.js +232 -231
- package/es/components/super-form/super-form-action.vue2.js +41 -40
- package/es/components/super-form/super-form-item.vue2.js +206 -203
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +62 -62
- package/es/components/table/field.js +130 -110
- package/es/components/table/table.vue2.js +152 -150
- package/es/components/table/use/use-columns.js +29 -26
- package/es/components/table/use/use-data-source.js +87 -86
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
- package/es/components/transfer/transfer-panel.vue2.js +57 -56
- package/es/components/transfer/transfer.vue2.js +70 -69
- package/es/components/tree/tree.vue2.js +60 -59
- package/es/components/upload/index.d.ts +3 -3
- package/es/components/upload/upload-content.vue.d.ts +2 -2
- package/es/components/upload/upload-content.vue2.js +78 -75
- package/es/components/upload/upload-list.vue2.js +46 -45
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/components/upload/upload.vue2.js +87 -85
- package/es/components/upload/utils.js +29 -29
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +9 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +5 -1
- package/es/locale/index.d.js +1 -0
- package/es/locale/index.d.ts +26 -0
- package/es/locale/index.js +10 -0
- package/es/locale/lang/en.d.ts +183 -0
- package/es/locale/lang/en.js +241 -0
- package/es/locale/lang/zh-cn.d.ts +183 -0
- package/es/locale/lang/zh-cn.js +241 -0
- package/es/locale/lang/zh-tw.d.ts +183 -0
- package/es/locale/lang/zh-tw.js +241 -0
- package/es/locale/use-locale.d.ts +17 -0
- package/es/locale/use-locale.js +56 -0
- 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/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +1 -0
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.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-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.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/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/jumper.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/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-columns.cjs +1 -1
- package/lib/components/table/use/use-data-source.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/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +3 -3
- package/lib/components/upload/upload-content.vue.d.ts +2 -2
- 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.vue.d.ts +2 -2
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/utils.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.cjs +1 -0
- package/lib/locale/index.d.cjs +1 -0
- package/lib/locale/index.d.ts +26 -0
- package/lib/locale/lang/en.cjs +1 -0
- package/lib/locale/lang/en.d.ts +183 -0
- package/lib/locale/lang/zh-cn.cjs +1 -0
- package/lib/locale/lang/zh-cn.d.ts +183 -0
- package/lib/locale/lang/zh-tw.cjs +1 -0
- package/lib/locale/lang/zh-tw.d.ts +183 -0
- package/lib/locale/use-locale.cjs +1 -0
- package/lib/locale/use-locale.d.ts +17 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/super-form.scss +0 -1
- package/theme-style/vft-super-form.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,113 +1,114 @@
|
|
|
1
|
-
import { getRouterKeyPath as
|
|
2
|
-
import { useMultipleTabStore as S, useTabs as O, isTabPinned as
|
|
1
|
+
import { getRouterKeyPath as u } from "@vft/router";
|
|
2
|
+
import { useMultipleTabStore as S, useTabs as O, isTabPinned as A } from "@vft/store";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { reactive as
|
|
4
|
+
import { reactive as U, computed as q } from "vue";
|
|
5
5
|
import "../../context-menu/context-menu.vue2.js";
|
|
6
6
|
import "../../icon/index.js";
|
|
7
|
+
import { useLocale as y } from "../../../locale/use-locale.js";
|
|
7
8
|
import "vue-router";
|
|
8
|
-
function
|
|
9
|
-
const s =
|
|
9
|
+
function H(e, i) {
|
|
10
|
+
const { t: n } = y(), s = U({
|
|
10
11
|
current: null,
|
|
11
12
|
currentIndex: 0
|
|
12
|
-
}),
|
|
13
|
-
refreshPage:
|
|
14
|
-
closeAll:
|
|
15
|
-
close:
|
|
16
|
-
closeLeft:
|
|
17
|
-
closeOther:
|
|
18
|
-
closeRight:
|
|
19
|
-
newWinTab:
|
|
20
|
-
fullScreen:
|
|
21
|
-
alonePage:
|
|
22
|
-
pinTab:
|
|
23
|
-
unpinTab:
|
|
24
|
-
} = O(), D =
|
|
13
|
+
}), t = S(), {
|
|
14
|
+
refreshPage: p,
|
|
15
|
+
closeAll: g,
|
|
16
|
+
close: f,
|
|
17
|
+
closeLeft: h,
|
|
18
|
+
closeOther: b,
|
|
19
|
+
closeRight: T,
|
|
20
|
+
newWinTab: v,
|
|
21
|
+
fullScreen: x,
|
|
22
|
+
alonePage: L,
|
|
23
|
+
pinTab: C,
|
|
24
|
+
unpinTab: m
|
|
25
|
+
} = O(), D = q(() => {
|
|
25
26
|
if (!e)
|
|
26
27
|
return;
|
|
27
|
-
const { meta:
|
|
28
|
+
const { meta: l } = e, o = s.currentIndex, r = A(e), c = !r, a = !!l?.userPinned, P = o === 0 || o <= i, M = t.getTabList.length <= i || o === t.getTabList.length - 1 && t.getLastDragEndIndex >= 0, R = t.getTabList.length === i || t.getTabList.length === i + 1 && o === i, d = t.getTabList.length === i;
|
|
28
29
|
return [
|
|
29
30
|
{
|
|
30
31
|
iconCfg: { icon: "icon-refresh-right" },
|
|
31
|
-
text: "
|
|
32
|
-
handler: () =>
|
|
32
|
+
text: n("vft.multipleTabs.refresh"),
|
|
33
|
+
handler: () => p(e)
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
iconCfg: { icon: "icon-new-tab" },
|
|
36
|
-
text: "
|
|
37
|
-
handler: () =>
|
|
37
|
+
text: n("vft.multipleTabs.openInNewTab"),
|
|
38
|
+
handler: () => v(e),
|
|
38
39
|
divider: !0
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
42
|
iconCfg: { icon: "icon-close-tab" },
|
|
42
|
-
text: "
|
|
43
|
+
text: n("vft.multipleTabs.closeTab"),
|
|
43
44
|
disabled: r || d,
|
|
44
|
-
handler: () =>
|
|
45
|
+
handler: () => f(e)
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
48
|
iconCfg: { icon: "icon-arrow-close-left" },
|
|
48
|
-
text: "
|
|
49
|
-
disabled:
|
|
50
|
-
handler: () =>
|
|
49
|
+
text: n("vft.multipleTabs.closeLeft"),
|
|
50
|
+
disabled: P,
|
|
51
|
+
handler: () => h(e)
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
iconCfg: { icon: "icon-arrow-close-right" },
|
|
54
|
-
text: "
|
|
55
|
+
text: n("vft.multipleTabs.closeRight"),
|
|
55
56
|
disabled: M,
|
|
56
57
|
divider: !0,
|
|
57
|
-
handler: () =>
|
|
58
|
+
handler: () => T(e)
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
iconCfg: { icon: "icon-close-box-multiple-outline" },
|
|
61
|
-
text: "
|
|
62
|
+
text: n("vft.multipleTabs.closeOther"),
|
|
62
63
|
disabled: R,
|
|
63
|
-
handler: () =>
|
|
64
|
+
handler: () => b(e)
|
|
64
65
|
},
|
|
65
66
|
{
|
|
66
67
|
iconCfg: { icon: "icon-vector-square-delete" },
|
|
67
|
-
text: "
|
|
68
|
+
text: n("vft.multipleTabs.closeAll"),
|
|
68
69
|
disabled: d,
|
|
69
70
|
divider: !0,
|
|
70
|
-
handler: () =>
|
|
71
|
+
handler: () => g()
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
74
|
iconCfg: { icon: "icon-full-screen" },
|
|
74
|
-
text: "
|
|
75
|
-
handler: () =>
|
|
75
|
+
text: n("vft.multipleTabs.fullScreen"),
|
|
76
|
+
handler: () => x(e)
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
iconCfg: { icon: "icon-separate" },
|
|
79
|
-
text: "
|
|
80
|
-
handler: () =>
|
|
81
|
-
divider: c ||
|
|
80
|
+
text: n("vft.multipleTabs.standalone"),
|
|
81
|
+
handler: () => L(e),
|
|
82
|
+
divider: c || a
|
|
82
83
|
},
|
|
83
84
|
...c ? [
|
|
84
85
|
{
|
|
85
86
|
iconCfg: { icon: "icon-tab-pin" },
|
|
86
|
-
text: "
|
|
87
|
-
handler: () =>
|
|
87
|
+
text: n("vft.multipleTabs.pin"),
|
|
88
|
+
handler: () => C(e)
|
|
88
89
|
}
|
|
89
|
-
] :
|
|
90
|
+
] : a ? [
|
|
90
91
|
{
|
|
91
92
|
iconCfg: { icon: "icon-tab-unpin" },
|
|
92
|
-
text: "
|
|
93
|
-
handler: () =>
|
|
93
|
+
text: n("vft.multipleTabs.unpin"),
|
|
94
|
+
handler: () => m(e)
|
|
94
95
|
}
|
|
95
96
|
] : []
|
|
96
97
|
];
|
|
97
98
|
});
|
|
98
|
-
function
|
|
99
|
-
return (
|
|
100
|
-
if (!
|
|
99
|
+
function w(l) {
|
|
100
|
+
return (o) => {
|
|
101
|
+
if (!l)
|
|
101
102
|
return;
|
|
102
|
-
|
|
103
|
-
const r =
|
|
104
|
-
(c) =>
|
|
103
|
+
o?.preventDefault();
|
|
104
|
+
const r = t.getTabList.findIndex(
|
|
105
|
+
(c) => u(c) === u(l)
|
|
105
106
|
);
|
|
106
|
-
s.current =
|
|
107
|
+
s.current = l, s.currentIndex = r;
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
return { getDropMenuList: D, handleContextMenu:
|
|
110
|
+
return { getDropMenuList: D, handleContextMenu: w };
|
|
110
111
|
}
|
|
111
112
|
export {
|
|
112
|
-
|
|
113
|
+
H as useTabDropdown
|
|
113
114
|
};
|
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as h, computed as _, createElementBlock as b, openBlock as C, unref as e, normalizeClass as n, createElementVNode as r, createVNode as z, 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";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as V } 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 {
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { useLocale as x } from "../../../locale/use-locale.js";
|
|
12
|
+
import { VftInput as E } from "../../input/index.js";
|
|
13
|
+
import { usePagination as I } from "../usePagination.js";
|
|
14
|
+
const N = ["disabled"], G = /* @__PURE__ */ v({
|
|
14
15
|
__name: "jumper",
|
|
15
16
|
props: {
|
|
16
17
|
size: {}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
o.value = +
|
|
19
|
+
setup(l) {
|
|
20
|
+
const a = V("pagination"), { t: i } = x(), { pageCount: m, disabled: s, currentPage: u, changeEvent: c } = I(), o = h(), d = _(() => o.value ?? u?.value);
|
|
21
|
+
function f(t) {
|
|
22
|
+
o.value = +t;
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
24
|
+
function g(t) {
|
|
25
|
+
t = Math.trunc(+t), c?.(+t), o.value = void 0;
|
|
25
26
|
}
|
|
26
|
-
return (
|
|
27
|
-
class:
|
|
27
|
+
return (t, j) => (C(), b("span", {
|
|
28
|
+
class: n(e(a).e("jump")),
|
|
28
29
|
disabled: e(s)
|
|
29
30
|
}, [
|
|
30
|
-
|
|
31
|
-
class:
|
|
32
|
-
}, "
|
|
33
|
-
|
|
34
|
-
size:
|
|
35
|
-
class:
|
|
31
|
+
r("span", {
|
|
32
|
+
class: n([e(a).e("goto")])
|
|
33
|
+
}, p(e(i)("vft.pagination.goto")), 3),
|
|
34
|
+
z(e(E), {
|
|
35
|
+
size: l.size,
|
|
36
|
+
class: n([e(a).e("editor"), e(a).is("in-pagination")]),
|
|
36
37
|
min: 1,
|
|
37
|
-
max: e(
|
|
38
|
+
max: e(m),
|
|
38
39
|
disabled: e(s),
|
|
39
|
-
"model-value":
|
|
40
|
+
"model-value": d.value,
|
|
40
41
|
"validate-event": !1,
|
|
41
42
|
type: "number",
|
|
42
|
-
"onUpdate:modelValue":
|
|
43
|
-
onChange:
|
|
43
|
+
"onUpdate:modelValue": f,
|
|
44
|
+
onChange: g
|
|
44
45
|
}, null, 8, ["size", "class", "max", "disabled", "model-value"]),
|
|
45
|
-
|
|
46
|
-
class:
|
|
47
|
-
}, "
|
|
48
|
-
], 10,
|
|
46
|
+
r("span", {
|
|
47
|
+
class: n([e(a).e("classifier")])
|
|
48
|
+
}, p(e(i)("vft.pagination.pageClassifier")), 3)
|
|
49
|
+
], 10, N));
|
|
49
50
|
}
|
|
50
51
|
});
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
G as default
|
|
53
54
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isEqual as
|
|
1
|
+
import { defineComponent as z, ref as d, watch as n, computed as f, createElementBlock as S, openBlock as h, normalizeClass as v, unref as s, createVNode as C } from "vue";
|
|
2
|
+
import { isEqual as b } from "lodash-es";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "../../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as P } 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 {
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { useLocale as y } from "../../../locale/use-locale.js";
|
|
12
|
+
import { usePagination as B } from "../usePagination.js";
|
|
13
|
+
import { VftSelect as N } from "../../select/index.js";
|
|
14
|
+
const K = /* @__PURE__ */ z({
|
|
14
15
|
__name: "sizes",
|
|
15
16
|
props: {
|
|
16
17
|
pageSize: {},
|
|
@@ -21,13 +22,13 @@ const I = /* @__PURE__ */ g({
|
|
|
21
22
|
},
|
|
22
23
|
emits: ["page-size-change"],
|
|
23
24
|
setup(a, { emit: o }) {
|
|
24
|
-
const
|
|
25
|
+
const r = o, l = P("pagination"), { t: p } = y(), m = B(), i = d(a.pageSize);
|
|
25
26
|
n(
|
|
26
27
|
() => a.pageSizes,
|
|
27
28
|
(e, t) => {
|
|
28
|
-
if (!
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
if (!b(e, t) && Array.isArray(e)) {
|
|
30
|
+
const g = e.includes(a.pageSize) ? a.pageSize : a.pageSizes[0];
|
|
31
|
+
r("page-size-change", g);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
), n(
|
|
@@ -36,27 +37,27 @@ const I = /* @__PURE__ */ g({
|
|
|
36
37
|
i.value = e;
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
|
-
const
|
|
40
|
-
() => a.pageSizes.map((e) => ({ label: e + "
|
|
40
|
+
const c = f(
|
|
41
|
+
() => a.pageSizes.map((e) => ({ label: e + p("vft.pagination.itemsPerPage"), value: e }))
|
|
41
42
|
);
|
|
42
|
-
function
|
|
43
|
-
e !== i.value && (i.value = e,
|
|
43
|
+
function u(e) {
|
|
44
|
+
e !== i.value && (i.value = e, m.handleSizeChange?.(Number(e)));
|
|
44
45
|
}
|
|
45
|
-
return (e, t) => (
|
|
46
|
-
class:
|
|
46
|
+
return (e, t) => (h(), S("span", {
|
|
47
|
+
class: v(s(l).e("sizes"))
|
|
47
48
|
}, [
|
|
48
|
-
|
|
49
|
+
C(s(N), {
|
|
49
50
|
"model-value": i.value,
|
|
50
51
|
disabled: a.disabled,
|
|
51
52
|
"popper-class": a.popperClass,
|
|
52
53
|
size: a.size,
|
|
53
54
|
"validate-event": !1,
|
|
54
|
-
onChange:
|
|
55
|
-
options:
|
|
55
|
+
onChange: u,
|
|
56
|
+
options: c.value
|
|
56
57
|
}, null, 8, ["model-value", "disabled", "popper-class", "size", "options"])
|
|
57
58
|
], 2));
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
K as default
|
|
62
63
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, createElementBlock as n, openBlock as s, unref as t, normalizeClass as p, toDisplayString as m } 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";
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { useLocale as c } from "../../../locale/use-locale.js";
|
|
12
|
+
import { usePagination as d } from "../usePagination.js";
|
|
13
|
+
const f = ["disabled"], L = /* @__PURE__ */ r({
|
|
13
14
|
__name: "total",
|
|
14
15
|
props: {
|
|
15
16
|
total: { default: 0 }
|
|
16
17
|
},
|
|
17
18
|
setup(o) {
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
20
|
-
class:
|
|
21
|
-
disabled: t(
|
|
22
|
-
}, "
|
|
19
|
+
const a = l("pagination"), { t: e } = c(), { disabled: i } = d();
|
|
20
|
+
return (u, _) => (s(), n("span", {
|
|
21
|
+
class: p(t(a).e("total")),
|
|
22
|
+
disabled: t(i)
|
|
23
|
+
}, m(t(e)("vft.pagination.total", { total: o.total })), 11, f));
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
L as default
|
|
27
28
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as w, computed as r, createBlock as y, openBlock as B, unref as t, mergeProps as $, withCtx as c, renderSlot as b, createCommentVNode as T, createElementVNode as a, normalizeClass as l, createTextVNode as f, normalizeStyle as I, toDisplayString as m, createVNode as x } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { addUnit as
|
|
4
|
+
import { addUnit as P } 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 h } from "../button/index.js";
|
|
8
|
+
import { VftIcon as S } from "../icon/index.js";
|
|
9
|
+
import { VftTooltip as A } from "../tooltip/index.js";
|
|
10
|
+
import { useNamespace as R } 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
|
-
|
|
14
|
+
import { useLocale as q } from "../../locale/use-locale.js";
|
|
15
|
+
const D = v({
|
|
15
16
|
name: "VftPopconfirm"
|
|
16
|
-
}),
|
|
17
|
-
...
|
|
17
|
+
}), Z = /* @__PURE__ */ v({
|
|
18
|
+
...D,
|
|
18
19
|
props: {
|
|
19
20
|
title: {},
|
|
20
21
|
confirmButtonText: {},
|
|
@@ -31,18 +32,18 @@ const R = h({
|
|
|
31
32
|
},
|
|
32
33
|
emits: ["confirm", "cancel"],
|
|
33
34
|
setup(e, { emit: C }) {
|
|
34
|
-
const i = e,
|
|
35
|
+
const i = e, s = C, n = R("popconfirm"), p = w(), { t: u } = q(), d = () => {
|
|
35
36
|
p.value?.onClose?.();
|
|
36
37
|
}, k = r(() => ({
|
|
37
|
-
width:
|
|
38
|
-
})),
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
() => i.confirmButtonText || "
|
|
44
|
-
),
|
|
45
|
-
return (o,
|
|
38
|
+
width: P(i.width)
|
|
39
|
+
})), V = (o) => {
|
|
40
|
+
s("confirm", o), d();
|
|
41
|
+
}, g = (o) => {
|
|
42
|
+
s("cancel", o), d();
|
|
43
|
+
}, z = r(
|
|
44
|
+
() => i.confirmButtonText || u("vft.popconfirm.confirm")
|
|
45
|
+
), N = r(() => i.cancelButtonText || u("vft.popconfirm.cancel"));
|
|
46
|
+
return (o, E) => (B(), y(t(A), $({
|
|
46
47
|
ref_key: "tooltipRef",
|
|
47
48
|
ref: p,
|
|
48
49
|
trigger: "click",
|
|
@@ -55,57 +56,57 @@ const R = h({
|
|
|
55
56
|
"hide-after": e.hideAfter,
|
|
56
57
|
persistent: e.persistent
|
|
57
58
|
}), {
|
|
58
|
-
content:
|
|
59
|
+
content: c(() => [
|
|
59
60
|
a("div", {
|
|
60
|
-
class:
|
|
61
|
+
class: l(t(n).b())
|
|
61
62
|
}, [
|
|
62
63
|
a("div", {
|
|
63
|
-
class:
|
|
64
|
+
class: l(t(n).e("main"))
|
|
64
65
|
}, [
|
|
65
|
-
!e.hideIcon && e.icon ? (
|
|
66
|
+
!e.hideIcon && e.icon ? (B(), y(t(S), {
|
|
66
67
|
key: 0,
|
|
67
68
|
icon: e.icon,
|
|
68
69
|
size: 20,
|
|
69
|
-
class:
|
|
70
|
-
style:
|
|
71
|
-
}, null, 8, ["icon", "class", "style"])) :
|
|
72
|
-
f(" " +
|
|
70
|
+
class: l(t(n).e("icon")),
|
|
71
|
+
style: I({ color: e.iconColor })
|
|
72
|
+
}, null, 8, ["icon", "class", "style"])) : T("", !0),
|
|
73
|
+
f(" " + m(e.title), 1)
|
|
73
74
|
], 2),
|
|
74
75
|
a("div", {
|
|
75
|
-
class:
|
|
76
|
+
class: l(t(n).e("action"))
|
|
76
77
|
}, [
|
|
77
|
-
|
|
78
|
+
x(t(h), {
|
|
78
79
|
size: "small",
|
|
79
80
|
type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
|
|
80
81
|
text: e.cancelButtonType === "text",
|
|
81
|
-
onClick:
|
|
82
|
+
onClick: g
|
|
82
83
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
f(
|
|
84
|
+
default: c(() => [
|
|
85
|
+
f(m(N.value), 1)
|
|
85
86
|
]),
|
|
86
87
|
_: 1
|
|
87
88
|
}, 8, ["type", "text"]),
|
|
88
|
-
|
|
89
|
+
x(t(h), {
|
|
89
90
|
size: "small",
|
|
90
91
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
91
92
|
text: e.confirmButtonType === "text",
|
|
92
|
-
onClick:
|
|
93
|
+
onClick: V
|
|
93
94
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
f(
|
|
95
|
+
default: c(() => [
|
|
96
|
+
f(m(z.value), 1)
|
|
96
97
|
]),
|
|
97
98
|
_: 1
|
|
98
99
|
}, 8, ["type", "text"])
|
|
99
100
|
], 2)
|
|
100
101
|
], 2)
|
|
101
102
|
]),
|
|
102
|
-
default:
|
|
103
|
-
o.$slots.reference ?
|
|
103
|
+
default: c(() => [
|
|
104
|
+
o.$slots.reference ? b(o.$slots, "reference", { key: 0 }) : T("", !0)
|
|
104
105
|
]),
|
|
105
106
|
_: 3
|
|
106
107
|
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
107
108
|
}
|
|
108
109
|
});
|
|
109
110
|
export {
|
|
110
|
-
|
|
111
|
+
Z as default
|
|
111
112
|
};
|