vft 0.0.499 → 0.0.501
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/autocomplete/autocomplete.vue.d.ts +6 -6
- package/es/components/autocomplete/index.d.ts +18 -18
- package/es/components/button/index.d.ts +9 -9
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/image-viewer/image-viewer.vue.d.ts +2 -0
- package/es/components/image-viewer/image-viewer.vue2.js +89 -85
- package/es/components/image-viewer/index.d.ts +18 -0
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/index.d.ts +3 -3
- package/es/components/select/index.d.ts +15 -15
- package/es/components/select/select.vue.d.ts +15 -15
- package/es/components/select/useSelect.d.ts +12 -12
- package/es/components/super-form/style/css.d.ts +1 -0
- package/es/components/super-form/style/index.d.ts +1 -0
- package/es/components/super-form/super-form-item.vue2.js +360 -325
- package/es/components/super-form/types.d.ts +3 -1
- package/es/components/table/field.js +32 -33
- package/es/components/table/table.vue2.js +51 -49
- package/es/components/table/use/use-data-source.js +166 -143
- package/es/components/table/use/use-loading.js +11 -11
- package/es/components/table/use/use-table.js +7 -6
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/tree-select/select.js +24 -24
- package/es/components/tree-select/tree-select-option.js +18 -7
- package/es/components/tree-select/tree-select.vue2.js +28 -26
- package/es/components/tree-select/tree.js +27 -26
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +1 -0
- package/es/utils/form-register.js +5 -4
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +6 -6
- package/lib/components/autocomplete/index.d.ts +18 -18
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/image-viewer/image-viewer.vue.d.ts +2 -0
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/image-viewer/index.d.ts +18 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/index.d.ts +3 -3
- package/lib/components/select/index.d.ts +15 -15
- package/lib/components/select/select.vue.d.ts +15 -15
- package/lib/components/select/useSelect.d.ts +12 -12
- package/lib/components/super-form/style/css.d.ts +1 -0
- package/lib/components/super-form/style/index.d.ts +1 -0
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/table/use/use-loading.cjs +1 -1
- package/lib/components/table/use/use-table.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/tree-select/select.cjs +1 -1
- package/lib/components/tree-select/tree-select-option.cjs +1 -1
- package/lib/components/tree-select/tree-select.vue2.cjs +1 -1
- package/lib/components/tree-select/tree.cjs +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +1 -0
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/icon-text.scss +1 -1
- package/theme-style/src/tree-select.scss +8 -0
- package/theme-style/vft-icon-text.css +1 -1
- package/theme-style/vft-tree-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { watch as
|
|
2
|
-
import { useEventListener as
|
|
1
|
+
import { watch as b, nextTick as h, computed as c, onMounted as A, toRefs as L } from "vue";
|
|
2
|
+
import { useEventListener as T } from "@vueuse/core";
|
|
3
3
|
import { pick as k, get as d } from "lodash-es";
|
|
4
4
|
import "../select/index.js";
|
|
5
5
|
import { selectV2Props as C } from "../select/defaults.js";
|
|
6
6
|
import "@vft/utils";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
|
-
import { EVENT_CODE as
|
|
8
|
+
import { EVENT_CODE as y } from "../../constants/aria.js";
|
|
9
9
|
import { UPDATE_MODEL_EVENT as O } from "../../constants/event.js";
|
|
10
10
|
import "../form/index.js";
|
|
11
11
|
import { useNamespace as w } from "../../hooks/use-namespace/index.js";
|
|
@@ -33,21 +33,21 @@ const Z = (e, { attrs: s, emit: f }, {
|
|
|
33
33
|
tree: r,
|
|
34
34
|
key: n
|
|
35
35
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const g = w("tree-select");
|
|
37
|
+
b(
|
|
38
38
|
() => e.data,
|
|
39
39
|
() => {
|
|
40
|
-
e.filterable &&
|
|
40
|
+
e.filterable && h(() => {
|
|
41
41
|
const t = l.value?.states?.inputValue || "";
|
|
42
42
|
r.value?.filter(t);
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
45
|
{ flush: "post" }
|
|
46
46
|
);
|
|
47
|
-
const
|
|
47
|
+
const x = (t) => {
|
|
48
48
|
const o = t.at(-1);
|
|
49
49
|
if (o.expanded && o.childNodes.at(-1))
|
|
50
|
-
|
|
50
|
+
x([o.childNodes.at(-1)]);
|
|
51
51
|
else {
|
|
52
52
|
r.value?.el$?.querySelector(
|
|
53
53
|
`[data-key="${t.at(-1).key}"]`
|
|
@@ -59,32 +59,32 @@ const Z = (e, { attrs: s, emit: f }, {
|
|
|
59
59
|
label: "label",
|
|
60
60
|
children: "children",
|
|
61
61
|
...e.props
|
|
62
|
-
})),
|
|
63
|
-
|
|
62
|
+
})), p = () => {
|
|
63
|
+
h(() => {
|
|
64
64
|
const t = l.value;
|
|
65
65
|
if (!t?.states) return;
|
|
66
|
-
const o = e.data || [], i = m.value.value,
|
|
66
|
+
const o = e.data || [], i = m.value.value, v = m.value.label, u = m.value.children, S = D(o, i, v, u), a = e.modelValue;
|
|
67
67
|
if (a == null || Array.isArray(a) && a.length === 0) {
|
|
68
68
|
t.states.selectedLabel = "";
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
const E =
|
|
73
|
-
return E ? d(E,
|
|
71
|
+
const M = (Array.isArray(a) ? a : [a]).map((N) => {
|
|
72
|
+
const E = S.find((V) => d(V, i) === N);
|
|
73
|
+
return E ? d(E, v) : "";
|
|
74
74
|
});
|
|
75
|
-
t.states.selectedLabel =
|
|
75
|
+
t.states.selectedLabel = M.filter(Boolean).join(", ");
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
return A(() => {
|
|
79
|
-
|
|
78
|
+
return l.syncSelectedLabel = p, A(() => {
|
|
79
|
+
p(), T(
|
|
80
80
|
() => l.value?.selectRef,
|
|
81
81
|
"keydown",
|
|
82
82
|
async (t) => {
|
|
83
83
|
const o = j(t), i = l.value?.expanded;
|
|
84
|
-
[
|
|
85
|
-
if (
|
|
84
|
+
[y.down, y.up].includes(o) && i && (await h(), setTimeout(() => {
|
|
85
|
+
if (y.up === o) {
|
|
86
86
|
const u = r.value?.store?.root?.childNodes;
|
|
87
|
-
u &&
|
|
87
|
+
u && x(u);
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
(l.value?.states?.hoveringIndex ?? -1) >= 0 && l.value?.filteredOptions && r.value?.el$?.querySelector("[data-key]")?.focus({ preventScroll: !0 });
|
|
@@ -94,12 +94,12 @@ const Z = (e, { attrs: s, emit: f }, {
|
|
|
94
94
|
capture: !0
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
|
-
}),
|
|
97
|
+
}), b(
|
|
98
98
|
() => [e.data, e.modelValue],
|
|
99
|
-
|
|
99
|
+
p,
|
|
100
100
|
{ immediate: !0, deep: !0 }
|
|
101
101
|
), {
|
|
102
|
-
...k(
|
|
102
|
+
...k(L(e), Object.keys(C)),
|
|
103
103
|
...s,
|
|
104
104
|
class: c(() => s.class),
|
|
105
105
|
style: c(() => s.style),
|
|
@@ -109,7 +109,7 @@ const Z = (e, { attrs: s, emit: f }, {
|
|
|
109
109
|
"onUpdate:modelValue": (t) => f(O, t),
|
|
110
110
|
valueKey: n,
|
|
111
111
|
popperClass: c(() => {
|
|
112
|
-
const t = [
|
|
112
|
+
const t = [g.e("popper")];
|
|
113
113
|
return e.popperClass && t.push(e.popperClass), t.join(" ");
|
|
114
114
|
}),
|
|
115
115
|
popperStyle: c(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n, inject as r, computed as i, h as o } from "vue";
|
|
2
|
+
const c = n({
|
|
3
3
|
name: "TreeSelectOption",
|
|
4
4
|
props: {
|
|
5
5
|
value: {
|
|
@@ -19,17 +19,28 @@ const u = l({
|
|
|
19
19
|
default: !0
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
setup(e, { slots:
|
|
23
|
-
|
|
22
|
+
setup(e, { slots: a }) {
|
|
23
|
+
const l = r("treeSelectModelValue", null), u = i(() => {
|
|
24
|
+
if (!l || l.value === void 0 || l.value === null)
|
|
25
|
+
return !1;
|
|
26
|
+
const t = l.value;
|
|
27
|
+
return Array.isArray(t) ? t.includes(e.value) : t === e.value;
|
|
28
|
+
});
|
|
29
|
+
return () => e.visible ? o(
|
|
24
30
|
"span",
|
|
25
31
|
{
|
|
26
|
-
class:
|
|
32
|
+
class: [
|
|
33
|
+
"vft-tree-select-option",
|
|
34
|
+
{
|
|
35
|
+
"is-selected": u.value
|
|
36
|
+
}
|
|
37
|
+
],
|
|
27
38
|
"data-value": e.value
|
|
28
39
|
},
|
|
29
|
-
|
|
40
|
+
a.default ? a.default() : e.label
|
|
30
41
|
) : null;
|
|
31
42
|
}
|
|
32
43
|
});
|
|
33
44
|
export {
|
|
34
|
-
|
|
45
|
+
c as default
|
|
35
46
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as h, ref as s, computed as m, reactive as
|
|
1
|
+
import { defineComponent as h, ref as s, computed as m, provide as g, toRef as C, reactive as n, onMounted as k, h as a } from "vue";
|
|
2
2
|
import { pick as u } from "lodash-es";
|
|
3
|
-
import { VftSelect as
|
|
4
|
-
import { selectV2Props as
|
|
5
|
-
import { VftTree as
|
|
6
|
-
import { useSelect as
|
|
7
|
-
import { useTree as
|
|
8
|
-
const
|
|
3
|
+
import { VftSelect as b } from "../select/index.js";
|
|
4
|
+
import { selectV2Props as v } from "../select/defaults.js";
|
|
5
|
+
import { VftTree as B } from "../tree/index.js";
|
|
6
|
+
import { useSelect as N } from "./select.js";
|
|
7
|
+
import { useTree as K } from "./tree.js";
|
|
8
|
+
const S = {
|
|
9
9
|
data: Array,
|
|
10
10
|
emptyText: String,
|
|
11
11
|
renderAfterExpand: {
|
|
@@ -51,13 +51,13 @@ const v = {
|
|
|
51
51
|
default: 18
|
|
52
52
|
},
|
|
53
53
|
icon: [String, Object]
|
|
54
|
-
},
|
|
54
|
+
}, E = h({
|
|
55
55
|
name: "VftTreeSelect",
|
|
56
56
|
// disable `VftSelect` inherit current attrs
|
|
57
57
|
inheritAttrs: !1,
|
|
58
58
|
props: {
|
|
59
|
-
...k,
|
|
60
59
|
...v,
|
|
60
|
+
...S,
|
|
61
61
|
/**
|
|
62
62
|
* @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data
|
|
63
63
|
*/
|
|
@@ -81,16 +81,18 @@ const v = {
|
|
|
81
81
|
default: 274
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
setup(
|
|
85
|
-
const { expose: i } = r, e = s(),
|
|
84
|
+
setup(t, r) {
|
|
85
|
+
const { expose: i } = r, e = s(), o = s(), d = m(() => t.nodeKey || t.valueKey || "value");
|
|
86
|
+
g("treeSelectModelValue", C(t, "modelValue"));
|
|
87
|
+
const f = N(t, r, { select: e, tree: o, key: d }), p = K(t, r, {
|
|
86
88
|
select: e,
|
|
87
|
-
tree:
|
|
89
|
+
tree: o,
|
|
88
90
|
key: d
|
|
89
|
-
}), { cacheOptions:
|
|
90
|
-
return i(c),
|
|
91
|
+
}), { cacheOptions: A, ...y } = p, c = n({});
|
|
92
|
+
return i(c), k(() => {
|
|
91
93
|
Object.assign(c, {
|
|
92
94
|
//TODO: let only tree and select in 3.0
|
|
93
|
-
...u(
|
|
95
|
+
...u(o.value, [
|
|
94
96
|
"filter",
|
|
95
97
|
"updateKeyChildren",
|
|
96
98
|
"getCheckedNodes",
|
|
@@ -112,11 +114,11 @@ const v = {
|
|
|
112
114
|
]),
|
|
113
115
|
...u(e.value, ["focus", "blur"]),
|
|
114
116
|
selectedLabel: e.value?.selectedLabel ?? "",
|
|
115
|
-
treeRef:
|
|
117
|
+
treeRef: o.value,
|
|
116
118
|
selectRef: e.value
|
|
117
119
|
});
|
|
118
|
-
}), () =>
|
|
119
|
-
|
|
120
|
+
}), () => a(
|
|
121
|
+
b,
|
|
120
122
|
/**
|
|
121
123
|
* 1. The `props` is processed into `Refs`, but `v-bind` and
|
|
122
124
|
* render function props cannot read `Refs`, so use `reactive`
|
|
@@ -126,24 +128,24 @@ const v = {
|
|
|
126
128
|
* 3. VftSelect requires `options` prop, but we use custom slots
|
|
127
129
|
* so we pass an empty array.
|
|
128
130
|
*/
|
|
129
|
-
|
|
131
|
+
n({
|
|
130
132
|
...f,
|
|
131
133
|
// Pass a dummy option to prevent "No data" from showing
|
|
132
134
|
// Since we use custom slots (Tree in footer), this won't be rendered
|
|
133
|
-
ref: (
|
|
135
|
+
ref: (l) => e.value = l
|
|
134
136
|
}),
|
|
135
137
|
{
|
|
136
138
|
default: () => null,
|
|
137
139
|
// Custom rendering in footer
|
|
138
|
-
empty: () =>
|
|
140
|
+
empty: () => a("div", {
|
|
139
141
|
style: { display: "none" }
|
|
140
142
|
}),
|
|
141
143
|
// Hide "No data" container completely
|
|
142
|
-
footer: () =>
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
footer: () => a(
|
|
145
|
+
B,
|
|
146
|
+
n({
|
|
145
147
|
...y,
|
|
146
|
-
ref: (
|
|
148
|
+
ref: (l) => o.value = l
|
|
147
149
|
})
|
|
148
150
|
)
|
|
149
151
|
}
|
|
@@ -151,5 +153,5 @@ const v = {
|
|
|
151
153
|
}
|
|
152
154
|
});
|
|
153
155
|
export {
|
|
154
|
-
|
|
156
|
+
E as default
|
|
155
157
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { watch as
|
|
1
|
+
import { watch as D, nextTick as x, computed as C, toRefs as A } from "vue";
|
|
2
2
|
import { isEqual as P, pick as T, isNil as z } from "lodash-es";
|
|
3
3
|
import { UPDATE_MODEL_EVENT as v } from "../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
@@ -8,13 +8,13 @@ import { escapeStringRegexp as H } from "../../utils/vue/data-helper.js";
|
|
|
8
8
|
import "../form/index.js";
|
|
9
9
|
import "../tree/index.js";
|
|
10
10
|
import I from "./tree-select-option.js";
|
|
11
|
-
import { toValidArray as r, treeFind as K, isValidValue as
|
|
11
|
+
import { toValidArray as r, treeFind as K, isValidValue as S, treeEach as b, isValidArray as _ } from "./utils.js";
|
|
12
12
|
const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
13
|
-
select:
|
|
13
|
+
select: u,
|
|
14
14
|
tree: t,
|
|
15
15
|
key: m
|
|
16
16
|
}) => {
|
|
17
|
-
|
|
17
|
+
D(
|
|
18
18
|
[() => e.modelValue, t],
|
|
19
19
|
() => {
|
|
20
20
|
e.showCheckbox && x(() => {
|
|
@@ -30,7 +30,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
30
30
|
deep: !0
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
const
|
|
33
|
+
const M = C(() => ({
|
|
34
34
|
value: m.value,
|
|
35
35
|
label: "label",
|
|
36
36
|
children: "children",
|
|
@@ -38,7 +38,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
38
38
|
isLeaf: "isLeaf",
|
|
39
39
|
...e.props
|
|
40
40
|
})), d = (l, c) => {
|
|
41
|
-
const n =
|
|
41
|
+
const n = M.value[l];
|
|
42
42
|
return F(n) ? n(
|
|
43
43
|
c,
|
|
44
44
|
t.value?.getNode(d("value", c))
|
|
@@ -48,7 +48,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
48
48
|
(c) => d("value", c) === l,
|
|
49
49
|
(c) => d("children", c),
|
|
50
50
|
(c, n, i, o) => o && d("value", o)
|
|
51
|
-
)).filter((l) =>
|
|
51
|
+
)).filter((l) => S(l)), O = C(() => {
|
|
52
52
|
if (!e.renderAfterExpand && !e.lazy) return [];
|
|
53
53
|
const l = [];
|
|
54
54
|
return b(
|
|
@@ -66,7 +66,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
66
66
|
}), V = () => t.value?.getCheckedKeys().filter((l) => {
|
|
67
67
|
const c = t.value?.getNode(l);
|
|
68
68
|
return !z(c) && R(c.childNodes);
|
|
69
|
-
}),
|
|
69
|
+
}), w = [
|
|
70
70
|
"data",
|
|
71
71
|
"emptyText",
|
|
72
72
|
"renderAfterExpand",
|
|
@@ -95,7 +95,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
95
95
|
"icon"
|
|
96
96
|
];
|
|
97
97
|
return {
|
|
98
|
-
...T(A(e),
|
|
98
|
+
...T(A(e), w),
|
|
99
99
|
...f,
|
|
100
100
|
nodeKey: m,
|
|
101
101
|
// only expand on click node when the `check-strictly` is false
|
|
@@ -123,11 +123,12 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
123
123
|
label: d("label", l),
|
|
124
124
|
disabled: d("disabled", l)
|
|
125
125
|
};
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
|
|
126
|
+
if (u.value?.allOptionsValueMap) {
|
|
127
|
+
const s = u.value.allOptionsValueMap.get(i);
|
|
128
|
+
s ? u.value?.onSelect(s.option) : u.value?.onSelect(o);
|
|
129
129
|
} else
|
|
130
|
-
|
|
130
|
+
u.value?.onSelect(o);
|
|
131
|
+
u.syncSelectedLabel && u.syncSelectedLabel();
|
|
131
132
|
}
|
|
132
133
|
} else e.expandOnClickNode && n.proxy.handleExpandIconClick();
|
|
133
134
|
},
|
|
@@ -139,9 +140,9 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
139
140
|
(a) => i[a.key] = a,
|
|
140
141
|
(a) => a.childNodes
|
|
141
142
|
);
|
|
142
|
-
const o = c.checkedKeys,
|
|
143
|
+
const o = c.checkedKeys, s = e.multiple ? r(e.modelValue).filter(
|
|
143
144
|
(a) => !(a in i) && !o.includes(a)
|
|
144
|
-
) : [], y =
|
|
145
|
+
) : [], y = s.concat(o);
|
|
145
146
|
if (e.checkStrictly)
|
|
146
147
|
k(
|
|
147
148
|
v,
|
|
@@ -150,20 +151,20 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
150
151
|
);
|
|
151
152
|
else if (e.multiple) {
|
|
152
153
|
const a = V();
|
|
153
|
-
k(v,
|
|
154
|
+
k(v, s.concat(a));
|
|
154
155
|
} else {
|
|
155
156
|
const a = K(
|
|
156
157
|
[l],
|
|
157
|
-
(
|
|
158
|
-
(
|
|
159
|
-
), E = a ? d("value", a) : void 0,
|
|
158
|
+
(h) => !_(d("children", h)) && !d("disabled", h),
|
|
159
|
+
(h) => d("children", h)
|
|
160
|
+
), E = a ? d("value", a) : void 0, L = S(e.modelValue) && !!K(
|
|
160
161
|
[l],
|
|
161
|
-
(
|
|
162
|
-
(
|
|
162
|
+
(h) => d("value", h) === e.modelValue,
|
|
163
|
+
(h) => d("children", h)
|
|
163
164
|
);
|
|
164
165
|
k(
|
|
165
166
|
v,
|
|
166
|
-
E === e.modelValue ||
|
|
167
|
+
E === e.modelValue || L ? void 0 : E
|
|
167
168
|
);
|
|
168
169
|
}
|
|
169
170
|
x(() => {
|
|
@@ -174,7 +175,7 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
174
175
|
halfCheckedKeys: t.value.getHalfCheckedKeys(),
|
|
175
176
|
halfCheckedNodes: t.value.getHalfCheckedNodes()
|
|
176
177
|
});
|
|
177
|
-
}),
|
|
178
|
+
}), u.value?.focus();
|
|
178
179
|
},
|
|
179
180
|
onNodeExpand: (l, c, n) => {
|
|
180
181
|
f.onNodeExpand?.(l, c, n), x(() => {
|
|
@@ -185,15 +186,15 @@ const $ = (e, { attrs: f, slots: N, emit: k }, {
|
|
|
185
186
|
(a) => i[a.key] = a,
|
|
186
187
|
(a) => a.childNodes
|
|
187
188
|
);
|
|
188
|
-
const
|
|
189
|
+
const s = r(e.modelValue).filter(
|
|
189
190
|
(a) => !(a in i) && !o.includes(a)
|
|
190
191
|
), y = V();
|
|
191
|
-
k(v,
|
|
192
|
+
k(v, s.concat(y));
|
|
192
193
|
}
|
|
193
194
|
});
|
|
194
195
|
},
|
|
195
196
|
// else
|
|
196
|
-
cacheOptions:
|
|
197
|
+
cacheOptions: O
|
|
197
198
|
};
|
|
198
199
|
};
|
|
199
200
|
export {
|
|
@@ -50,6 +50,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
50
50
|
type: import("vue").PropType<string>;
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
|
+
accept: {
|
|
54
|
+
type: import("vue").PropType<string>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
53
57
|
fileList: {
|
|
54
58
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
55
59
|
default: never[];
|
|
@@ -61,10 +65,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
61
65
|
type: import("vue").PropType<boolean>;
|
|
62
66
|
default: boolean;
|
|
63
67
|
};
|
|
64
|
-
accept: {
|
|
65
|
-
type: import("vue").PropType<string>;
|
|
66
|
-
default: string;
|
|
67
|
-
};
|
|
68
68
|
autoUpload: {
|
|
69
69
|
type: import("vue").PropType<boolean>;
|
|
70
70
|
default: boolean;
|
|
@@ -178,9 +178,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
178
178
|
sizeWidth: number;
|
|
179
179
|
sizeHeight: number;
|
|
180
180
|
action: string;
|
|
181
|
+
accept: string;
|
|
181
182
|
fileList: import("./types").UploadUserFile[];
|
|
182
183
|
showFileList: boolean;
|
|
183
|
-
accept: string;
|
|
184
184
|
autoUpload: boolean;
|
|
185
185
|
listType: import("./types").ListType;
|
|
186
186
|
httpRequest: import("./types").UploadRequestHandler;
|
|
@@ -246,6 +246,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
246
246
|
type: import("vue").PropType<string>;
|
|
247
247
|
default: string;
|
|
248
248
|
};
|
|
249
|
+
accept: {
|
|
250
|
+
type: import("vue").PropType<string>;
|
|
251
|
+
default: string;
|
|
252
|
+
};
|
|
249
253
|
fileList: {
|
|
250
254
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
251
255
|
default: never[];
|
|
@@ -257,10 +261,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
257
261
|
type: import("vue").PropType<boolean>;
|
|
258
262
|
default: boolean;
|
|
259
263
|
};
|
|
260
|
-
accept: {
|
|
261
|
-
type: import("vue").PropType<string>;
|
|
262
|
-
default: string;
|
|
263
|
-
};
|
|
264
264
|
autoUpload: {
|
|
265
265
|
type: import("vue").PropType<boolean>;
|
|
266
266
|
default: boolean;
|
|
@@ -374,9 +374,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
374
374
|
sizeWidth: number;
|
|
375
375
|
sizeHeight: number;
|
|
376
376
|
action: string;
|
|
377
|
+
accept: string;
|
|
377
378
|
fileList: import("./types").UploadUserFile[];
|
|
378
379
|
showFileList: boolean;
|
|
379
|
-
accept: string;
|
|
380
380
|
autoUpload: boolean;
|
|
381
381
|
listType: import("./types").ListType;
|
|
382
382
|
httpRequest: import("./types").UploadRequestHandler;
|
|
@@ -439,6 +439,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
439
439
|
type: import("vue").PropType<string>;
|
|
440
440
|
default: string;
|
|
441
441
|
};
|
|
442
|
+
accept: {
|
|
443
|
+
type: import("vue").PropType<string>;
|
|
444
|
+
default: string;
|
|
445
|
+
};
|
|
442
446
|
fileList: {
|
|
443
447
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
444
448
|
default: never[];
|
|
@@ -450,10 +454,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
450
454
|
type: import("vue").PropType<boolean>;
|
|
451
455
|
default: boolean;
|
|
452
456
|
};
|
|
453
|
-
accept: {
|
|
454
|
-
type: import("vue").PropType<string>;
|
|
455
|
-
default: string;
|
|
456
|
-
};
|
|
457
457
|
autoUpload: {
|
|
458
458
|
type: import("vue").PropType<boolean>;
|
|
459
459
|
default: boolean;
|
|
@@ -567,9 +567,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
567
567
|
sizeWidth: number;
|
|
568
568
|
sizeHeight: number;
|
|
569
569
|
action: string;
|
|
570
|
+
accept: string;
|
|
570
571
|
fileList: import("./types").UploadUserFile[];
|
|
571
572
|
showFileList: boolean;
|
|
572
|
-
accept: string;
|
|
573
573
|
autoUpload: boolean;
|
|
574
574
|
listType: import("./types").ListType;
|
|
575
575
|
httpRequest: import("./types").UploadRequestHandler;
|
|
@@ -50,9 +50,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
50
50
|
sizeWidth: number;
|
|
51
51
|
sizeHeight: number;
|
|
52
52
|
action: string;
|
|
53
|
+
accept: string;
|
|
53
54
|
fileList: import("./types").UploadUserFile[];
|
|
54
55
|
showFileList: boolean;
|
|
55
|
-
accept: string;
|
|
56
56
|
autoUpload: boolean;
|
|
57
57
|
listType: import("./types").ListType;
|
|
58
58
|
httpRequest: import("./types").UploadRequestHandler;
|
|
@@ -104,9 +104,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
104
104
|
sizeWidth: number;
|
|
105
105
|
sizeHeight: number;
|
|
106
106
|
action: string;
|
|
107
|
+
accept: string;
|
|
107
108
|
fileList: import("./types").UploadUserFile[];
|
|
108
109
|
showFileList: boolean;
|
|
109
|
-
accept: string;
|
|
110
110
|
autoUpload: boolean;
|
|
111
111
|
listType: import("./types").ListType;
|
|
112
112
|
httpRequest: import("./types").UploadRequestHandler;
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import { getCurrentInstance as i, inject as e, computed as c, unref as
|
|
5
|
+
import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = Z(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = {
|
|
2
2
|
Custom: "custom",
|
|
3
3
|
AutoComplete: "autocomplete",
|
|
4
4
|
Cascader: "cascader",
|
|
@@ -12,6 +12,7 @@ const r = {
|
|
|
12
12
|
Slider: "slider",
|
|
13
13
|
Divider: "divider",
|
|
14
14
|
Select: "select",
|
|
15
|
+
Tree: "tree",
|
|
15
16
|
TreeSelect: "tree-select",
|
|
16
17
|
Search: "search",
|
|
17
18
|
Radio: "radio",
|
|
@@ -39,8 +40,8 @@ function i(e, n) {
|
|
|
39
40
|
t.set(e, n);
|
|
40
41
|
}
|
|
41
42
|
function c(e) {
|
|
42
|
-
Object.entries(e).forEach(([n,
|
|
43
|
-
t.set(n,
|
|
43
|
+
Object.entries(e).forEach(([n, r]) => {
|
|
44
|
+
t.set(n, r);
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
function a(e) {
|
|
@@ -59,7 +60,7 @@ function p() {
|
|
|
59
60
|
t.clear();
|
|
60
61
|
}
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
o as FormCompEnum,
|
|
63
64
|
p as clearComponents,
|
|
64
65
|
a as getComponent,
|
|
65
66
|
m as getRegisteredComponents,
|
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isArray as E, hasOwn as m, camelize as N } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|