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,144 +1,145 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, useSlots as H, reactive as J, ref as y, computed as s, watch as K, h as T, Comment as O, createElementBlock as h, openBlock as u, normalizeClass as i, unref as t, createVNode as a, createElementVNode as X, withCtx as l, renderSlot as f, createCommentVNode as P, toDisplayString as V } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
|
-
import { isEmpty as
|
|
4
|
-
import { debugWarn as
|
|
3
|
+
import { isEmpty as w, isUndefined as E } from "@vft/utils";
|
|
4
|
+
import { debugWarn as Y } from "../../utils/error.js";
|
|
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 Z } 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
|
+
import { useLocale as x } from "../../locale/use-locale.js";
|
|
12
13
|
import { VftButton as D } from "../button/index.js";
|
|
13
14
|
import { VftIcon as S } from "../icon/index.js";
|
|
14
|
-
import { transferEmits as
|
|
15
|
+
import { transferEmits as ee, transferProps as te } from "./transfer.js";
|
|
15
16
|
import "./transfer-panel.js";
|
|
16
|
-
import { usePropsAlias as
|
|
17
|
-
import { useCheckedChange as
|
|
18
|
-
import { useComputedData as
|
|
19
|
-
import { useMove as
|
|
20
|
-
import
|
|
21
|
-
import { useFormItem as
|
|
22
|
-
const
|
|
17
|
+
import { usePropsAlias as re } from "./composables/use-props-alias.js";
|
|
18
|
+
import { useCheckedChange as oe } from "./composables/use-checked-change.js";
|
|
19
|
+
import { useComputedData as ae } from "./composables/use-computed-data.js";
|
|
20
|
+
import { useMove as le } from "./composables/use-move.js";
|
|
21
|
+
import N from "./transfer-panel.vue2.js";
|
|
22
|
+
import { useFormItem as se } from "../form/hooks/use-form-item.js";
|
|
23
|
+
const ne = { key: 0 }, ie = { key: 0 }, fe = $({
|
|
23
24
|
name: "VftTransfer"
|
|
24
|
-
}),
|
|
25
|
-
...
|
|
26
|
-
props:
|
|
27
|
-
emits:
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
25
|
+
}), _e = /* @__PURE__ */ $({
|
|
26
|
+
...fe,
|
|
27
|
+
props: te,
|
|
28
|
+
emits: ee,
|
|
29
|
+
setup(B, { expose: _, emit: I }) {
|
|
30
|
+
const r = B, C = I, M = H(), o = Z("transfer"), { t: d } = x(), { formItem: q } = se(), n = J({
|
|
30
31
|
leftChecked: [],
|
|
31
32
|
rightChecked: []
|
|
32
|
-
}),
|
|
33
|
+
}), k = re(r), { sourceData: A, targetData: F } = ae(r), { onSourceCheckedChange: L, onTargetCheckedChange: R } = oe(
|
|
33
34
|
n,
|
|
34
|
-
|
|
35
|
-
), { addToLeft: z, addToRight:
|
|
35
|
+
C
|
|
36
|
+
), { addToLeft: z, addToRight: Q } = le(r, n, C), c = y(), m = y(), U = (e) => {
|
|
36
37
|
switch (e) {
|
|
37
38
|
case "left":
|
|
38
|
-
|
|
39
|
+
c.value.query = "";
|
|
39
40
|
break;
|
|
40
41
|
case "right":
|
|
41
|
-
|
|
42
|
+
m.value.query = "";
|
|
42
43
|
break;
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
-
() =>
|
|
45
|
+
}, g = s(() => r.buttonTexts.length === 2), W = s(() => r.titles[0] || d("vft.transferExtend.list1")), j = s(() => r.titles[1] || d("vft.transferExtend.list2")), b = s(
|
|
46
|
+
() => r.filterPlaceholder || d("vft.transfer.filterPlaceholder")
|
|
46
47
|
);
|
|
47
|
-
|
|
48
|
-
() =>
|
|
48
|
+
K(
|
|
49
|
+
() => r.modelValue,
|
|
49
50
|
() => {
|
|
50
|
-
|
|
51
|
+
r.validateEvent && q?.validate?.("change").catch((e) => Y(e));
|
|
51
52
|
}
|
|
52
53
|
);
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
(
|
|
54
|
+
const v = s(() => (e) => {
|
|
55
|
+
if (r.renderContent) return r.renderContent(T, e);
|
|
56
|
+
const p = (M.default?.({ option: e }) || []).filter(
|
|
57
|
+
(G) => G.type !== O
|
|
57
58
|
);
|
|
58
|
-
return
|
|
59
|
+
return p.length ? p : T(
|
|
59
60
|
"span",
|
|
60
|
-
e[
|
|
61
|
+
e[k.value.label] || e[k.value.key]
|
|
61
62
|
);
|
|
62
63
|
});
|
|
63
|
-
return
|
|
64
|
+
return _({
|
|
64
65
|
/** @description clear the filter keyword of a certain panel */
|
|
65
|
-
clearQuery:
|
|
66
|
+
clearQuery: U,
|
|
66
67
|
/** @description left panel ref */
|
|
67
|
-
leftPanel:
|
|
68
|
+
leftPanel: c,
|
|
68
69
|
/** @description right panel ref */
|
|
69
|
-
rightPanel:
|
|
70
|
-
}), (e,
|
|
71
|
-
class: i(t(
|
|
70
|
+
rightPanel: m
|
|
71
|
+
}), (e, p) => (u(), h("div", {
|
|
72
|
+
class: i(t(o).b())
|
|
72
73
|
}, [
|
|
73
|
-
a(
|
|
74
|
+
a(N, {
|
|
74
75
|
ref_key: "leftPanel",
|
|
75
|
-
ref:
|
|
76
|
-
data: t(
|
|
77
|
-
"option-render":
|
|
78
|
-
placeholder:
|
|
79
|
-
title:
|
|
76
|
+
ref: c,
|
|
77
|
+
data: t(A),
|
|
78
|
+
"option-render": v.value,
|
|
79
|
+
placeholder: b.value,
|
|
80
|
+
title: W.value,
|
|
80
81
|
filterable: e.filterable,
|
|
81
82
|
format: e.format,
|
|
82
83
|
"filter-method": e.filterMethod,
|
|
83
84
|
"default-checked": e.leftDefaultChecked,
|
|
84
|
-
props:
|
|
85
|
-
onCheckedChange: t(
|
|
85
|
+
props: r.props,
|
|
86
|
+
onCheckedChange: t(L)
|
|
86
87
|
}, {
|
|
87
88
|
empty: l(() => [
|
|
88
|
-
|
|
89
|
+
f(e.$slots, "left-empty")
|
|
89
90
|
]),
|
|
90
91
|
default: l(() => [
|
|
91
|
-
|
|
92
|
+
f(e.$slots, "left-footer")
|
|
92
93
|
]),
|
|
93
94
|
_: 3
|
|
94
95
|
}, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]),
|
|
95
|
-
|
|
96
|
-
class: i(t(
|
|
96
|
+
X("div", {
|
|
97
|
+
class: i(t(o).e("buttons"))
|
|
97
98
|
}, [
|
|
98
99
|
a(t(D), {
|
|
99
100
|
type: "primary",
|
|
100
|
-
class: i([t(
|
|
101
|
-
disabled: t(
|
|
101
|
+
class: i([t(o).e("button"), t(o).is("with-texts", g.value)]),
|
|
102
|
+
disabled: t(w)(n.rightChecked),
|
|
102
103
|
onClick: t(z)
|
|
103
104
|
}, {
|
|
104
105
|
default: l(() => [
|
|
105
106
|
a(t(S), { icon: "icon-arrow-left" }),
|
|
106
|
-
t(
|
|
107
|
+
t(E)(e.buttonTexts[0]) ? P("", !0) : (u(), h("span", ne, V(e.buttonTexts[0]), 1))
|
|
107
108
|
]),
|
|
108
109
|
_: 1
|
|
109
110
|
}, 8, ["class", "disabled", "onClick"]),
|
|
110
111
|
a(t(D), {
|
|
111
112
|
type: "primary",
|
|
112
|
-
class: i([t(
|
|
113
|
-
disabled: t(
|
|
114
|
-
onClick: t(
|
|
113
|
+
class: i([t(o).e("button"), t(o).is("with-texts", g.value)]),
|
|
114
|
+
disabled: t(w)(n.leftChecked),
|
|
115
|
+
onClick: t(Q)
|
|
115
116
|
}, {
|
|
116
117
|
default: l(() => [
|
|
117
|
-
t(
|
|
118
|
+
t(E)(e.buttonTexts[1]) ? P("", !0) : (u(), h("span", ie, V(e.buttonTexts[1]), 1)),
|
|
118
119
|
a(t(S), { icon: "icon-arrow-right" })
|
|
119
120
|
]),
|
|
120
121
|
_: 1
|
|
121
122
|
}, 8, ["class", "disabled", "onClick"])
|
|
122
123
|
], 2),
|
|
123
|
-
a(
|
|
124
|
+
a(N, {
|
|
124
125
|
ref_key: "rightPanel",
|
|
125
|
-
ref:
|
|
126
|
-
data: t(
|
|
127
|
-
"option-render":
|
|
128
|
-
placeholder:
|
|
126
|
+
ref: m,
|
|
127
|
+
data: t(F),
|
|
128
|
+
"option-render": v.value,
|
|
129
|
+
placeholder: b.value,
|
|
129
130
|
filterable: e.filterable,
|
|
130
131
|
format: e.format,
|
|
131
132
|
"filter-method": e.filterMethod,
|
|
132
|
-
title:
|
|
133
|
+
title: j.value,
|
|
133
134
|
"default-checked": e.rightDefaultChecked,
|
|
134
|
-
props:
|
|
135
|
+
props: r.props,
|
|
135
136
|
onCheckedChange: t(R)
|
|
136
137
|
}, {
|
|
137
138
|
empty: l(() => [
|
|
138
|
-
|
|
139
|
+
f(e.$slots, "right-empty")
|
|
139
140
|
]),
|
|
140
141
|
default: l(() => [
|
|
141
|
-
|
|
142
|
+
f(e.$slots, "right-footer")
|
|
142
143
|
]),
|
|
143
144
|
_: 3
|
|
144
145
|
}, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"])
|
|
@@ -146,5 +147,5 @@ const le = { key: 0 }, se = { key: 0 }, ne = N({
|
|
|
146
147
|
}
|
|
147
148
|
});
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
_e as default
|
|
150
151
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Z, getCurrentInstance as x, ref as s, computed as _, watch as i, provide as w, createElementBlock as K, openBlock as y, normalizeClass as h, unref as n, createCommentVNode as ee, withDirectives as te, Fragment as re, renderList as oe, createBlock as ne, renderSlot as de, createElementVNode as E, toDisplayString as ae, vShow as le } from "vue";
|
|
2
2
|
import "../form/index.js";
|
|
3
3
|
import "../icon/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
7
|
import "lodash-es";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as ce } 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
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
12
|
+
import { useLocale as se } from "../../locale/use-locale.js";
|
|
13
|
+
import ie from "./model/tree-store.js";
|
|
14
|
+
import { useDragNodeHandler as ue } from "./model/useDragNode.js";
|
|
15
|
+
import { useKeydown as pe } from "./model/useKeydown.js";
|
|
16
|
+
import { useNodeExpandEventBroadcast as ye } from "./model/useNodeExpandEventBroadcast.js";
|
|
17
|
+
import { getNodeKey as he, handleCurrentChange as B } from "./model/util.js";
|
|
18
|
+
import fe from "./tree-node.vue.js";
|
|
19
|
+
import { formItemContextKey as me } from "../form/constants.js";
|
|
20
|
+
const Ie = /* @__PURE__ */ Z({
|
|
20
21
|
__name: "tree",
|
|
21
22
|
props: {
|
|
22
23
|
data: { default: [] },
|
|
@@ -52,8 +53,8 @@ const $e = /* @__PURE__ */ Y({
|
|
|
52
53
|
},
|
|
53
54
|
emits: ["check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over"],
|
|
54
55
|
setup(l, { expose: T, emit: D }) {
|
|
55
|
-
const t = l, f = D, C = x(), a =
|
|
56
|
-
new
|
|
56
|
+
const t = l, f = D, C = x(), a = ce("tree"), { t: b } = se(), r = s(
|
|
57
|
+
new ie({
|
|
57
58
|
key: t.nodeKey,
|
|
58
59
|
data: t.data,
|
|
59
60
|
lazy: t.lazy,
|
|
@@ -70,15 +71,15 @@ const $e = /* @__PURE__ */ Y({
|
|
|
70
71
|
})
|
|
71
72
|
);
|
|
72
73
|
r.value.initialize();
|
|
73
|
-
const u = s(r.value.root),
|
|
74
|
+
const u = s(r.value.root), S = s(null), m = s(null), g = s(null), { broadcastExpanded: q } = ye(t), { dragState: p } = ue({
|
|
74
75
|
props: t,
|
|
75
76
|
ctx: C,
|
|
76
|
-
el$:
|
|
77
|
+
el$: m,
|
|
77
78
|
dropIndicator$: g,
|
|
78
79
|
store: r
|
|
79
80
|
});
|
|
80
|
-
|
|
81
|
-
const
|
|
81
|
+
pe({ el$: m }, r);
|
|
82
|
+
const A = _(() => {
|
|
82
83
|
const { childNodes: e } = u.value;
|
|
83
84
|
return !e || e.length === 0 || e.every(({ visible: o }) => !o);
|
|
84
85
|
});
|
|
@@ -109,11 +110,11 @@ const $e = /* @__PURE__ */ Y({
|
|
|
109
110
|
r.value.checkStrictly = e;
|
|
110
111
|
}
|
|
111
112
|
);
|
|
112
|
-
const
|
|
113
|
+
const $ = (e) => {
|
|
113
114
|
if (!t.filterNodeMethod)
|
|
114
115
|
throw new Error("[Tree] filterNodeMethod is required when filter");
|
|
115
116
|
r.value.filter(e);
|
|
116
|
-
}, N = (e) =>
|
|
117
|
+
}, N = (e) => he(t.nodeKey, e.data), z = (e) => {
|
|
117
118
|
if (!t.nodeKey)
|
|
118
119
|
throw new Error("[Tree] nodeKey is required in getNodePath");
|
|
119
120
|
const o = r.value.getNode(e);
|
|
@@ -123,25 +124,25 @@ const $e = /* @__PURE__ */ Y({
|
|
|
123
124
|
for (; c && c !== u.value; )
|
|
124
125
|
d.push(c.data), c = c.parent;
|
|
125
126
|
return d.reverse();
|
|
126
|
-
},
|
|
127
|
+
}, H = (e, o) => r.value.getCheckedNodes(e, o), I = (e) => r.value.getCheckedKeys(e), k = () => {
|
|
127
128
|
const e = r.value.getCurrentNode();
|
|
128
129
|
return e ? e.data : null;
|
|
129
|
-
},
|
|
130
|
+
}, M = () => {
|
|
130
131
|
if (!t.nodeKey)
|
|
131
132
|
throw new Error("[Tree] nodeKey is required in getCurrentKey");
|
|
132
133
|
const e = k();
|
|
133
134
|
return e ? e[t.nodeKey] : null;
|
|
134
|
-
},
|
|
135
|
+
}, P = (e, o) => {
|
|
135
136
|
if (!t.nodeKey)
|
|
136
137
|
throw new Error("[Tree] nodeKey is required in setCheckedNodes");
|
|
137
138
|
r.value.setCheckedNodes(e, o);
|
|
138
|
-
},
|
|
139
|
+
}, L = (e, o) => {
|
|
139
140
|
if (!t.nodeKey)
|
|
140
141
|
throw new Error("[Tree] nodeKey is required in setCheckedKeys");
|
|
141
142
|
r.value.setCheckedKeys(e, o);
|
|
142
143
|
}, O = (e, o, d) => {
|
|
143
144
|
r.value.setChecked(e, o, d);
|
|
144
|
-
}, V = () => r.value.getHalfCheckedNodes(), F = () => r.value.getHalfCheckedKeys(),
|
|
145
|
+
}, V = () => r.value.getHalfCheckedNodes(), F = () => r.value.getHalfCheckedKeys(), R = (e, o = !0) => {
|
|
145
146
|
if (!t.nodeKey)
|
|
146
147
|
throw new Error("[Tree] nodeKey is required in setCurrentNode");
|
|
147
148
|
B(
|
|
@@ -149,7 +150,7 @@ const $e = /* @__PURE__ */ Y({
|
|
|
149
150
|
f,
|
|
150
151
|
() => r.value.setUserCurrentNode(e, o)
|
|
151
152
|
);
|
|
152
|
-
},
|
|
153
|
+
}, U = (e, o = !0) => {
|
|
153
154
|
if (!t.nodeKey)
|
|
154
155
|
throw new Error("[Tree] nodeKey is required in setCurrentKey");
|
|
155
156
|
B(
|
|
@@ -157,21 +158,21 @@ const $e = /* @__PURE__ */ Y({
|
|
|
157
158
|
f,
|
|
158
159
|
() => r.value.setCurrentNodeKey(e, o)
|
|
159
160
|
);
|
|
160
|
-
},
|
|
161
|
+
}, j = (e) => r.value.getNode(e), G = (e) => {
|
|
161
162
|
r.value.remove(e);
|
|
162
|
-
}, G = (e, o) => {
|
|
163
|
-
r.value.append(e, o);
|
|
164
163
|
}, J = (e, o) => {
|
|
165
|
-
r.value.
|
|
164
|
+
r.value.append(e, o);
|
|
166
165
|
}, Q = (e, o) => {
|
|
166
|
+
r.value.insertBefore(e, o);
|
|
167
|
+
}, W = (e, o) => {
|
|
167
168
|
r.value.insertAfter(e, o);
|
|
168
169
|
}, v = (e, o, d) => {
|
|
169
|
-
|
|
170
|
-
},
|
|
170
|
+
q(o), f("node-expand", e, o, d);
|
|
171
|
+
}, X = (e, o) => {
|
|
171
172
|
if (!t.nodeKey)
|
|
172
173
|
throw new Error("[Tree] nodeKey is required in updateKeyChild");
|
|
173
174
|
r.value.updateChildren(e, o);
|
|
174
|
-
},
|
|
175
|
+
}, Y = (e, o) => {
|
|
175
176
|
if (!t.nodeKey)
|
|
176
177
|
throw new Error("[Tree] nodeKey is required in updateKeyChild");
|
|
177
178
|
r.value.updateNode(e, o);
|
|
@@ -181,34 +182,34 @@ const $e = /* @__PURE__ */ Y({
|
|
|
181
182
|
props: t,
|
|
182
183
|
store: r,
|
|
183
184
|
root: u,
|
|
184
|
-
currentNode:
|
|
185
|
+
currentNode: S,
|
|
185
186
|
instance: x()
|
|
186
|
-
}), w(
|
|
187
|
-
filter:
|
|
187
|
+
}), w(me, void 0), T({
|
|
188
|
+
filter: $,
|
|
188
189
|
getNodeKey: N,
|
|
189
|
-
getNodePath:
|
|
190
|
-
getCheckedNodes:
|
|
191
|
-
getCheckedKeys:
|
|
190
|
+
getNodePath: z,
|
|
191
|
+
getCheckedNodes: H,
|
|
192
|
+
getCheckedKeys: I,
|
|
192
193
|
getCurrentNode: k,
|
|
193
|
-
getCurrentKey:
|
|
194
|
-
setCheckedNodes:
|
|
195
|
-
setCheckedKeys:
|
|
194
|
+
getCurrentKey: M,
|
|
195
|
+
setCheckedNodes: P,
|
|
196
|
+
setCheckedKeys: L,
|
|
196
197
|
setChecked: O,
|
|
197
198
|
getHalfCheckedNodes: V,
|
|
198
199
|
getHalfCheckedKeys: F,
|
|
199
|
-
setCurrentNode:
|
|
200
|
-
setCurrentKey:
|
|
201
|
-
getNode:
|
|
202
|
-
remove:
|
|
203
|
-
append:
|
|
204
|
-
insertBefore:
|
|
205
|
-
insertAfter:
|
|
200
|
+
setCurrentNode: R,
|
|
201
|
+
setCurrentKey: U,
|
|
202
|
+
getNode: j,
|
|
203
|
+
remove: G,
|
|
204
|
+
append: J,
|
|
205
|
+
insertBefore: Q,
|
|
206
|
+
insertAfter: W,
|
|
206
207
|
handleNodeExpand: v,
|
|
207
|
-
updateKeyChildren:
|
|
208
|
-
updateNode:
|
|
209
|
-
}), (e, o) => (y(),
|
|
208
|
+
updateKeyChildren: X,
|
|
209
|
+
updateNode: Y
|
|
210
|
+
}), (e, o) => (y(), K("div", {
|
|
210
211
|
ref_key: "el$",
|
|
211
|
-
ref:
|
|
212
|
+
ref: m,
|
|
212
213
|
class: h([
|
|
213
214
|
n(a).b(),
|
|
214
215
|
n(a).is("dragging", !!n(p).draggingNode),
|
|
@@ -218,7 +219,7 @@ const $e = /* @__PURE__ */ Y({
|
|
|
218
219
|
]),
|
|
219
220
|
role: "tree"
|
|
220
221
|
}, [
|
|
221
|
-
(y(!0),
|
|
222
|
+
(y(!0), K(re, null, oe(u.value.childNodes, (d) => (y(), ne(fe, {
|
|
222
223
|
key: N(d),
|
|
223
224
|
node: d,
|
|
224
225
|
props: t,
|
|
@@ -228,26 +229,26 @@ const $e = /* @__PURE__ */ Y({
|
|
|
228
229
|
"render-content": l.renderContent,
|
|
229
230
|
onNodeExpand: v
|
|
230
231
|
}, null, 8, ["node", "accordion", "render-after-expand", "show-checkbox", "render-content"]))), 128)),
|
|
231
|
-
|
|
232
|
+
A.value ? (y(), K("div", {
|
|
232
233
|
key: 0,
|
|
233
234
|
class: h(n(a).e("empty-block"))
|
|
234
235
|
}, [
|
|
235
|
-
|
|
236
|
+
de(e.$slots, "empty", {}, () => [
|
|
236
237
|
E("span", {
|
|
237
238
|
class: h(n(a).e("empty-text"))
|
|
238
|
-
},
|
|
239
|
+
}, ae(l.emptyText ?? n(b)("vft.tree.emptyText")), 3)
|
|
239
240
|
])
|
|
240
|
-
], 2)) :
|
|
241
|
-
|
|
241
|
+
], 2)) : ee("", !0),
|
|
242
|
+
te(E("div", {
|
|
242
243
|
ref_key: "dropIndicator$",
|
|
243
244
|
ref: g,
|
|
244
245
|
class: h(n(a).e("drop-indicator"))
|
|
245
246
|
}, null, 2), [
|
|
246
|
-
[
|
|
247
|
+
[le, n(p).showDropIndicator]
|
|
247
248
|
])
|
|
248
249
|
], 2));
|
|
249
250
|
}
|
|
250
251
|
});
|
|
251
252
|
export {
|
|
252
|
-
|
|
253
|
+
Ie as default
|
|
253
254
|
};
|
|
@@ -90,7 +90,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
90
90
|
};
|
|
91
91
|
sizeExceedMessage: {
|
|
92
92
|
type: import("vue").PropType<string>;
|
|
93
|
-
default:
|
|
93
|
+
default: undefined;
|
|
94
94
|
};
|
|
95
95
|
onSizeInvalid: {
|
|
96
96
|
type: import("vue").PropType<(file: File, width: number, height: number, expectedWidth: number, expectedHeight: number) => void>;
|
|
@@ -286,7 +286,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
286
286
|
};
|
|
287
287
|
sizeExceedMessage: {
|
|
288
288
|
type: import("vue").PropType<string>;
|
|
289
|
-
default:
|
|
289
|
+
default: undefined;
|
|
290
290
|
};
|
|
291
291
|
onSizeInvalid: {
|
|
292
292
|
type: import("vue").PropType<(file: File, width: number, height: number, expectedWidth: number, expectedHeight: number) => void>;
|
|
@@ -479,7 +479,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
479
479
|
};
|
|
480
480
|
sizeExceedMessage: {
|
|
481
481
|
type: import("vue").PropType<string>;
|
|
482
|
-
default:
|
|
482
|
+
default: undefined;
|
|
483
483
|
};
|
|
484
484
|
onSizeInvalid: {
|
|
485
485
|
type: import("vue").PropType<(file: File, width: number, height: number, expectedWidth: number, expectedHeight: number) => void>;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
17
17
|
fileList: never[];
|
|
18
18
|
replaceOnLimit: boolean;
|
|
19
19
|
maxSize: undefined;
|
|
20
|
-
sizeExceedMessage:
|
|
20
|
+
sizeExceedMessage: undefined;
|
|
21
21
|
sizeWidth: undefined;
|
|
22
22
|
sizeHeight: undefined;
|
|
23
23
|
}>>, {
|
|
@@ -38,7 +38,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
38
38
|
fileList: never[];
|
|
39
39
|
replaceOnLimit: boolean;
|
|
40
40
|
maxSize: undefined;
|
|
41
|
-
sizeExceedMessage:
|
|
41
|
+
sizeExceedMessage: undefined;
|
|
42
42
|
sizeWidth: undefined;
|
|
43
43
|
sizeHeight: undefined;
|
|
44
44
|
}>>> & Readonly<{}>, {
|