@aplus-frontend/ui 7.7.6 → 7.7.8
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/es/src/ag-grid/editable/form-item.vue.mjs +19 -16
- package/es/src/ag-grid/editable/index.vue.mjs +15 -12
- package/es/src/ag-grid/index.vue.mjs +1 -0
- package/es/src/ap-action/item/index.vue2.mjs +30 -31
- package/es/src/ap-action/style/index.d.ts +1 -0
- package/es/src/ap-action/style/index.mjs +63 -36
- package/es/src/ap-field/number/index.vue.d.ts +2 -0
- package/es/src/ap-field/number/index.vue.mjs +2 -2
- package/es/src/ap-field/tree-select/index.vue.d.ts +22 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +12 -11
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/number/index.vue.d.ts +10 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +24 -0
- package/es/src/ap-form/style/item.mjs +6 -0
- package/es/src/ap-grid/editable/form-item.vue.mjs +51 -48
- package/es/src/ap-grid/editable/index.vue.mjs +59 -56
- package/es/src/ap-grid/index.vue.mjs +11 -10
- package/es/src/ap-table/ap-table.vue2.mjs +3 -0
- package/es/src/ap-table/constants.d.ts +17 -1
- package/es/src/business/batch-input-group/index.vue.mjs +63 -63
- package/es/src/design-token/index.mjs +4 -2
- package/es/src/editable-table/form-item.vue.mjs +33 -30
- package/es/src/editable-table/index.vue.mjs +13 -10
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/index.d.ts +1 -0
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +2 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +22 -0
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +10 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +24 -0
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +17 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as K, useSlots as O, ref as y, onMounted as P, unref as t, watch as G, createElementBlock as M, openBlock as W, Fragment as U, createVNode as d, mergeProps as g, withCtx as h, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
|
|
2
|
-
import { ApForm as
|
|
3
|
-
import { cloneDeep as Y, isEqual as Z, omit as
|
|
2
|
+
import { ApForm as b } from "../../ap-form/index.mjs";
|
|
3
|
+
import { cloneDeep as Y, isEqual as Z, omit as C } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import { useGetEditableColumns as ee } from "../hooks/use-editable-columns.mjs";
|
|
6
6
|
import "../index.vue2.mjs";
|
|
@@ -69,6 +69,9 @@ const Ee = /* @__PURE__ */ K({
|
|
|
69
69
|
childrenColumnName: {},
|
|
70
70
|
rowExpandable: {},
|
|
71
71
|
transformCellText: {},
|
|
72
|
+
rowHoverable: {
|
|
73
|
+
type: Boolean
|
|
74
|
+
},
|
|
72
75
|
rowSelection: {
|
|
73
76
|
type: [Boolean, Object]
|
|
74
77
|
},
|
|
@@ -130,8 +133,8 @@ const Ee = /* @__PURE__ */ K({
|
|
|
130
133
|
setup(R, {
|
|
131
134
|
expose: B
|
|
132
135
|
}) {
|
|
133
|
-
const
|
|
134
|
-
b:
|
|
136
|
+
const v = O(), o = R, {
|
|
137
|
+
b: x
|
|
135
138
|
} = ie("editable-aggrid"), S = se("editable-aggrid"), r = y(), {
|
|
136
139
|
internalInstance: s,
|
|
137
140
|
model: I
|
|
@@ -155,10 +158,10 @@ const Ee = /* @__PURE__ */ K({
|
|
|
155
158
|
getRowData: j,
|
|
156
159
|
getRowsData: D,
|
|
157
160
|
setRowData: k,
|
|
158
|
-
clear:
|
|
161
|
+
clear: H,
|
|
159
162
|
refreshRowIds: m
|
|
160
163
|
} = oe(o, s, l, i);
|
|
161
|
-
function
|
|
164
|
+
function L() {
|
|
162
165
|
const e = r.value?._internalGridApi;
|
|
163
166
|
if (!m.value?.length || !e)
|
|
164
167
|
return;
|
|
@@ -177,7 +180,7 @@ const Ee = /* @__PURE__ */ K({
|
|
|
177
180
|
const n = e === "end" ? l.value.length - 1 : e;
|
|
178
181
|
r.value?.scrollToRow(n, a);
|
|
179
182
|
}
|
|
180
|
-
function
|
|
183
|
+
function z(e, a) {
|
|
181
184
|
r.value?.scrollToColumn(e, a);
|
|
182
185
|
}
|
|
183
186
|
return B({
|
|
@@ -188,31 +191,31 @@ const Ee = /* @__PURE__ */ K({
|
|
|
188
191
|
getRowData: j,
|
|
189
192
|
getRowsData: D,
|
|
190
193
|
setRowData: k,
|
|
191
|
-
clear:
|
|
194
|
+
clear: H,
|
|
192
195
|
setTableData: c,
|
|
193
196
|
scrollTo: f,
|
|
194
197
|
scrollToRow: f,
|
|
195
|
-
scrollToColumn:
|
|
196
|
-
}), (e, a) => (W(), M(U, null, [d(t(
|
|
198
|
+
scrollToColumn: z
|
|
199
|
+
}), (e, a) => (W(), M(U, null, [d(t(b).FormItem, {
|
|
197
200
|
hidden: "",
|
|
198
201
|
name: e.name
|
|
199
|
-
}, null, 8, ["name"]), d(t(
|
|
202
|
+
}, null, 8, ["name"]), d(t(b).FormItem, g(t(C)(e.formItem, "initialValue"), {
|
|
200
203
|
label: e.label
|
|
201
204
|
}), {
|
|
202
|
-
default: h(() => [d(de, g(t(
|
|
205
|
+
default: h(() => [d(de, g(t(C)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
203
206
|
ref_key: "tableRef",
|
|
204
207
|
ref: r,
|
|
205
|
-
class: [t(
|
|
208
|
+
class: [t(x)(), t(S)],
|
|
206
209
|
size: "mini",
|
|
207
210
|
columns: t(T),
|
|
208
211
|
"data-source": l.value,
|
|
209
212
|
"search-form": !1,
|
|
210
|
-
onUpdate:
|
|
213
|
+
onUpdate: L
|
|
211
214
|
}), $({
|
|
212
215
|
_: 2
|
|
213
|
-
}, [q(
|
|
216
|
+
}, [q(v, (n, w) => ({
|
|
214
217
|
name: w,
|
|
215
|
-
fn: h((
|
|
218
|
+
fn: h((A) => [J(e.$slots, w, Q(X(A || {})))])
|
|
216
219
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
217
220
|
_: 3
|
|
218
221
|
}, 16, ["label"])], 64));
|
|
@@ -67,6 +67,9 @@ const xe = /* @__PURE__ */ G({
|
|
|
67
67
|
childrenColumnName: {},
|
|
68
68
|
rowExpandable: {},
|
|
69
69
|
transformCellText: {},
|
|
70
|
+
rowHoverable: {
|
|
71
|
+
type: Boolean
|
|
72
|
+
},
|
|
70
73
|
rowSelection: {
|
|
71
74
|
type: [Boolean, Object]
|
|
72
75
|
},
|
|
@@ -130,11 +133,11 @@ const xe = /* @__PURE__ */ G({
|
|
|
130
133
|
emits: ["update:value"],
|
|
131
134
|
setup(h, {
|
|
132
135
|
expose: b,
|
|
133
|
-
emit:
|
|
136
|
+
emit: v
|
|
134
137
|
}) {
|
|
135
|
-
const
|
|
136
|
-
b:
|
|
137
|
-
} = le("editable-aggrid"), x = ne("editable-aggrid"), B =
|
|
138
|
+
const C = U(), o = h, {
|
|
139
|
+
b: R
|
|
140
|
+
} = le("editable-aggrid"), x = ne("editable-aggrid"), B = v, s = y(), {
|
|
138
141
|
value: r,
|
|
139
142
|
updateValue: m
|
|
140
143
|
} = re(o, B), l = y(), S = u.useWatch(o.name, l);
|
|
@@ -165,14 +168,14 @@ const xe = /* @__PURE__ */ G({
|
|
|
165
168
|
force: !0
|
|
166
169
|
}), i.value = [];
|
|
167
170
|
}
|
|
168
|
-
function
|
|
171
|
+
function H() {
|
|
169
172
|
l.value?.resetFields();
|
|
170
173
|
}
|
|
171
|
-
function
|
|
174
|
+
function I(e) {
|
|
172
175
|
return e ? (g(e) ? e : [e]).map((t) => g(t) ? [o.name, ...t] : [o.name, t]) : void 0;
|
|
173
176
|
}
|
|
174
|
-
async function
|
|
175
|
-
return (await l.value?.validateFields(
|
|
177
|
+
async function z(e, a) {
|
|
178
|
+
return (await l.value?.validateFields(I(e), a))?.[o.name];
|
|
176
179
|
}
|
|
177
180
|
function L(e) {
|
|
178
181
|
m(e);
|
|
@@ -187,8 +190,8 @@ const xe = /* @__PURE__ */ G({
|
|
|
187
190
|
s.value?.scrollToColumn(e, a);
|
|
188
191
|
}
|
|
189
192
|
return b({
|
|
190
|
-
resetFields:
|
|
191
|
-
validateFields:
|
|
193
|
+
resetFields: H,
|
|
194
|
+
validateFields: z,
|
|
192
195
|
add: F,
|
|
193
196
|
addMultiple: E,
|
|
194
197
|
remove: N,
|
|
@@ -218,7 +221,7 @@ const xe = /* @__PURE__ */ G({
|
|
|
218
221
|
default: d(() => [w(ie, q(n(oe)(o, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
219
222
|
ref_key: "tableRef",
|
|
220
223
|
ref: s,
|
|
221
|
-
class: [n(
|
|
224
|
+
class: [n(R)(), n(x)],
|
|
222
225
|
size: "mini",
|
|
223
226
|
columns: n(_),
|
|
224
227
|
"data-source": n(r),
|
|
@@ -226,7 +229,7 @@ const xe = /* @__PURE__ */ G({
|
|
|
226
229
|
onUpdate: K
|
|
227
230
|
}), J({
|
|
228
231
|
_: 2
|
|
229
|
-
}, [Q(
|
|
232
|
+
}, [Q(C, (t, f) => ({
|
|
230
233
|
name: f,
|
|
231
234
|
fn: d((P) => [X(e.$slots, f, Y(Z(P || {})))])
|
|
232
235
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, useSlots as F, createPropsRestProxy as N, ref as S, computed as d, unref as t, renderSlot as y, createElementBlock as u, createCommentVNode as f, openBlock as l, mergeProps as g, createVNode as v, normalizeClass as V, withCtx as I, createElementVNode as L, createBlock as k, resolveDynamicComponent as b, isVNode as P, toDisplayString as $ } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import w from "@aplus-frontend/antdv/es/button/LoadingIcon";
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
4
|
+
import { Tooltip as x } from "@aplus-frontend/antdv";
|
|
5
|
+
import D from "../style/index.mjs";
|
|
6
|
+
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const T = { key: 1 }, K = /* @__PURE__ */ A({
|
|
8
8
|
name: "ApActionItem",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -20,52 +20,51 @@ const x = { key: 1 }, K = /* @__PURE__ */ h({
|
|
|
20
20
|
tooltip: { default: () => ({}) }
|
|
21
21
|
},
|
|
22
22
|
setup(o) {
|
|
23
|
-
const
|
|
23
|
+
const a = F(), s = N(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon", "tooltip"]), { b: m, m: n, e: C } = E("action-item"), r = S(!1), c = d(() => o.iconFirst && !!(o.icon || a.icon)), B = D("action-item");
|
|
24
24
|
function p(e) {
|
|
25
|
-
|
|
25
|
+
t(i) || o.disabled || (s.onClick?.(e), s.onAction && (r.value = !0, s.onAction(e).finally(() => r.value = !1)));
|
|
26
26
|
}
|
|
27
|
-
const i =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
o.disabled ?
|
|
33
|
-
i.value ?
|
|
27
|
+
const i = d(() => o.loading || t(r)), h = d(() => [
|
|
28
|
+
B.value,
|
|
29
|
+
m(),
|
|
30
|
+
n(o.color),
|
|
31
|
+
c.value ? n("icon-first") : null,
|
|
32
|
+
o.disabled ? n("disabled") : null,
|
|
33
|
+
i.value ? n("loading") : null
|
|
34
34
|
].filter(Boolean));
|
|
35
35
|
return (e, z) => y(e.$slots, "trigger", {
|
|
36
36
|
loading: i.value,
|
|
37
37
|
disabled: e.disabled,
|
|
38
38
|
onClick: p
|
|
39
39
|
}, () => [
|
|
40
|
-
e.visible ? (
|
|
41
|
-
class:
|
|
40
|
+
e.visible ? (l(), u("span", g({ key: 0 }, e.$attrs, {
|
|
41
|
+
class: h.value,
|
|
42
42
|
onClick: p
|
|
43
43
|
}), [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"prefix-cls": "btn",
|
|
44
|
+
v(t(w), {
|
|
45
|
+
"prefix-cls": t(m)(),
|
|
47
46
|
"exist-icon": !1,
|
|
48
|
-
loading:
|
|
49
|
-
}
|
|
50
|
-
e.icon ||
|
|
51
|
-
key:
|
|
52
|
-
class:
|
|
47
|
+
loading: i.value
|
|
48
|
+
}, null, 8, ["prefix-cls", "loading"]),
|
|
49
|
+
e.icon || a.icon ? (l(), u("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: V(t(C)("icon-wrapper"))
|
|
53
52
|
}, [
|
|
54
|
-
|
|
55
|
-
title:
|
|
53
|
+
v(t(x), g({
|
|
54
|
+
title: c.value ? e.text : null
|
|
56
55
|
}, e.tooltip), {
|
|
57
56
|
default: I(() => [
|
|
58
57
|
L("span", null, [
|
|
59
|
-
(
|
|
58
|
+
(l(), k(b(e.icon || a.icon)))
|
|
60
59
|
])
|
|
61
60
|
]),
|
|
62
61
|
_: 1
|
|
63
62
|
}, 16, ["title"])
|
|
64
|
-
], 2)) :
|
|
65
|
-
|
|
66
|
-
P(e.text) ? (
|
|
63
|
+
], 2)) : f("", !0),
|
|
64
|
+
c.value ? f("", !0) : y(e.$slots, "default", { key: 1 }, () => [
|
|
65
|
+
P(e.text) ? (l(), k(b(e.text), { key: 0 })) : (l(), u("span", T, $(e.text || ""), 1))
|
|
67
66
|
])
|
|
68
|
-
], 16)) :
|
|
67
|
+
], 16)) : f("", !0)
|
|
69
68
|
]);
|
|
70
69
|
}
|
|
71
70
|
});
|
|
@@ -1,80 +1,107 @@
|
|
|
1
|
-
import { resetComponent as
|
|
1
|
+
import { resetComponent as s } from "../../style/index.mjs";
|
|
2
2
|
import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
|
|
3
|
-
const
|
|
3
|
+
const p = (o) => {
|
|
4
4
|
const {
|
|
5
|
-
loadingOpacity:
|
|
6
|
-
colorLink:
|
|
7
|
-
colorLinkHover:
|
|
8
|
-
colorSuccess:
|
|
9
|
-
colorError:
|
|
10
|
-
colorWarn:
|
|
11
|
-
componentCls:
|
|
5
|
+
loadingOpacity: r,
|
|
6
|
+
colorLink: n,
|
|
7
|
+
colorLinkHover: a,
|
|
8
|
+
colorSuccess: l,
|
|
9
|
+
colorError: c,
|
|
10
|
+
colorWarn: e,
|
|
11
|
+
componentCls: i
|
|
12
12
|
} = o;
|
|
13
13
|
return {
|
|
14
|
-
[
|
|
15
|
-
display: "inline-
|
|
14
|
+
[i]: {
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
whiteSpace: "nowrap",
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
gap: o.spaceXS,
|
|
16
21
|
cursor: "pointer",
|
|
17
|
-
...
|
|
22
|
+
...s(o),
|
|
18
23
|
"&--primary": {
|
|
19
|
-
color:
|
|
20
|
-
[`&:not(${
|
|
21
|
-
color:
|
|
24
|
+
color: n,
|
|
25
|
+
[`&:not(${i}--disabled):hover`]: {
|
|
26
|
+
color: a
|
|
22
27
|
},
|
|
23
|
-
[`&${
|
|
28
|
+
[`&${i}--disabled`]: {
|
|
24
29
|
color: o.colorLinkDisabled
|
|
25
30
|
}
|
|
26
31
|
},
|
|
27
32
|
"&--success": {
|
|
28
|
-
color:
|
|
29
|
-
[`&${
|
|
33
|
+
color: l,
|
|
34
|
+
[`&${i}--disabled`]: {
|
|
30
35
|
color: o.colorSuccessDisabled
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"&--error": {
|
|
34
|
-
color:
|
|
35
|
-
[`&${
|
|
39
|
+
color: c,
|
|
40
|
+
[`&${i}--disabled`]: {
|
|
36
41
|
color: o.colorErrorDisabled
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
"&--warn": {
|
|
40
|
-
color:
|
|
41
|
-
[`&${
|
|
45
|
+
color: e,
|
|
46
|
+
[`&${i}--disabled`]: {
|
|
42
47
|
color: o.colorWarnDisabled
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
50
|
"&--loading": {
|
|
46
|
-
opacity:
|
|
51
|
+
opacity: r,
|
|
47
52
|
transition: `opacity ${o.motionDurationMid}`,
|
|
48
53
|
cursor: "default",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
[`&${
|
|
54
|
+
// [`${componentCls}-loading-icon`]: {
|
|
55
|
+
// marginRight: token.spaceXS
|
|
56
|
+
// },
|
|
57
|
+
[`&${i}--disabled`]: {
|
|
53
58
|
opacity: 1
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"&--disabled": {
|
|
57
62
|
cursor: "not-allowed"
|
|
58
63
|
},
|
|
59
|
-
[`${
|
|
60
|
-
paddingRight: o.spaceXS
|
|
61
|
-
},
|
|
64
|
+
[`${i}__icon-wrapper`]: {},
|
|
62
65
|
"&--icon-first": {
|
|
63
|
-
[`${
|
|
66
|
+
[`${i}__icon-wrapper`]: {
|
|
64
67
|
paddingRight: 0
|
|
65
68
|
}
|
|
69
|
+
},
|
|
70
|
+
[`${i}-loading-icon`]: {
|
|
71
|
+
display: "inline-block",
|
|
72
|
+
lineHeight: 0,
|
|
73
|
+
transition: ["width", "opacity", "margin"].map(
|
|
74
|
+
(t) => `${t} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
|
|
75
|
+
).join(",")
|
|
76
|
+
},
|
|
77
|
+
[`${i}-loading-icon-motion`]: {
|
|
78
|
+
"&-enter-from": {
|
|
79
|
+
marginInlineEnd: o.calc(o.spaceXS).mul(-1).equal()
|
|
80
|
+
},
|
|
81
|
+
"&-enter-to": {
|
|
82
|
+
marginInlineEnd: 0
|
|
83
|
+
},
|
|
84
|
+
"&-leave-from": {
|
|
85
|
+
marginInlineEnd: 0
|
|
86
|
+
},
|
|
87
|
+
"&-leave-to": {
|
|
88
|
+
marginInlineEnd: o.calc(o.spaceXS).mul(-1).equal()
|
|
89
|
+
}
|
|
66
90
|
}
|
|
67
91
|
}
|
|
68
92
|
};
|
|
69
|
-
},
|
|
93
|
+
}, u = d(
|
|
70
94
|
"ApAction",
|
|
71
|
-
(o) => [
|
|
72
|
-
{
|
|
95
|
+
(o) => [p(o)],
|
|
96
|
+
{
|
|
97
|
+
loadingOpacity: 0.35,
|
|
98
|
+
apActionLoadingIconEase: "cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
99
|
+
},
|
|
73
100
|
{
|
|
74
101
|
skipUnit: ["loadingOpacity"]
|
|
75
102
|
}
|
|
76
103
|
);
|
|
77
104
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
u as default,
|
|
106
|
+
p as genActionItemStyle
|
|
80
107
|
};
|
|
@@ -384,6 +384,8 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
384
384
|
keyboard: boolean;
|
|
385
385
|
bordered: boolean;
|
|
386
386
|
emptyText: string;
|
|
387
|
+
changeOnWheel: boolean;
|
|
388
|
+
changeOnBlur: boolean;
|
|
387
389
|
min: ValueType;
|
|
388
390
|
max: ValueType;
|
|
389
391
|
controls: boolean;
|
|
@@ -30,8 +30,8 @@ const le = /* @__PURE__ */ C({
|
|
|
30
30
|
valueModifiers: {},
|
|
31
31
|
status: {},
|
|
32
32
|
variant: {},
|
|
33
|
-
changeOnWheel: { type: Boolean },
|
|
34
|
-
changeOnBlur: { type: Boolean },
|
|
33
|
+
changeOnWheel: { type: Boolean, default: void 0 },
|
|
34
|
+
changeOnBlur: { type: Boolean, default: void 0 },
|
|
35
35
|
stringMode: { type: Boolean },
|
|
36
36
|
defaultValue: {},
|
|
37
37
|
value: {},
|
|
@@ -88,6 +88,10 @@ declare function __VLS_template(): {
|
|
|
88
88
|
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
89
89
|
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
90
90
|
};
|
|
91
|
+
switcherLoadingIcon: {
|
|
92
|
+
default: any;
|
|
93
|
+
type: PropType<any>;
|
|
94
|
+
};
|
|
91
95
|
value: {
|
|
92
96
|
type: PropType<any>;
|
|
93
97
|
};
|
|
@@ -302,6 +306,7 @@ declare function __VLS_template(): {
|
|
|
302
306
|
treeCheckStrictly: boolean;
|
|
303
307
|
treeDataSimpleMode: any;
|
|
304
308
|
treeDefaultExpandAll: boolean;
|
|
309
|
+
switcherLoadingIcon: any;
|
|
305
310
|
replaceFields: FieldNames;
|
|
306
311
|
'onUpdate:treeExpandedKeys': (keys: Key[]) => void;
|
|
307
312
|
'onUpdate:searchValue': (value: string) => void;
|
|
@@ -318,6 +323,7 @@ declare function __VLS_template(): {
|
|
|
318
323
|
tagRender?: any;
|
|
319
324
|
suffixIcon?: any;
|
|
320
325
|
clearIcon?: any;
|
|
326
|
+
switcherLoadingIcon?: any;
|
|
321
327
|
}>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
322
328
|
P: {};
|
|
323
329
|
B: {};
|
|
@@ -373,6 +379,10 @@ declare function __VLS_template(): {
|
|
|
373
379
|
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
374
380
|
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
375
381
|
};
|
|
382
|
+
switcherLoadingIcon: {
|
|
383
|
+
default: any;
|
|
384
|
+
type: PropType<any>;
|
|
385
|
+
};
|
|
376
386
|
value: {
|
|
377
387
|
type: PropType<any>;
|
|
378
388
|
};
|
|
@@ -587,6 +597,7 @@ declare function __VLS_template(): {
|
|
|
587
597
|
treeCheckStrictly: boolean;
|
|
588
598
|
treeDataSimpleMode: any;
|
|
589
599
|
treeDefaultExpandAll: boolean;
|
|
600
|
+
switcherLoadingIcon: any;
|
|
590
601
|
replaceFields: FieldNames;
|
|
591
602
|
'onUpdate:treeExpandedKeys': (keys: Key[]) => void;
|
|
592
603
|
'onUpdate:searchValue': (value: string) => void;
|
|
@@ -672,6 +683,10 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
672
683
|
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
673
684
|
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
674
685
|
};
|
|
686
|
+
switcherLoadingIcon: {
|
|
687
|
+
default: any;
|
|
688
|
+
type: PropType<any>;
|
|
689
|
+
};
|
|
675
690
|
value: {
|
|
676
691
|
type: PropType<any>;
|
|
677
692
|
};
|
|
@@ -886,6 +901,7 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
886
901
|
treeCheckStrictly: boolean;
|
|
887
902
|
treeDataSimpleMode: any;
|
|
888
903
|
treeDefaultExpandAll: boolean;
|
|
904
|
+
switcherLoadingIcon: any;
|
|
889
905
|
replaceFields: FieldNames;
|
|
890
906
|
'onUpdate:treeExpandedKeys': (keys: Key[]) => void;
|
|
891
907
|
'onUpdate:searchValue': (value: string) => void;
|
|
@@ -902,6 +918,7 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
902
918
|
tagRender?: any;
|
|
903
919
|
suffixIcon?: any;
|
|
904
920
|
clearIcon?: any;
|
|
921
|
+
switcherLoadingIcon?: any;
|
|
905
922
|
}>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
906
923
|
P: {};
|
|
907
924
|
B: {};
|
|
@@ -957,6 +974,10 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
957
974
|
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
958
975
|
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
959
976
|
};
|
|
977
|
+
switcherLoadingIcon: {
|
|
978
|
+
default: any;
|
|
979
|
+
type: PropType<any>;
|
|
980
|
+
};
|
|
960
981
|
value: {
|
|
961
982
|
type: PropType<any>;
|
|
962
983
|
};
|
|
@@ -1171,6 +1192,7 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
1171
1192
|
treeCheckStrictly: boolean;
|
|
1172
1193
|
treeDataSimpleMode: any;
|
|
1173
1194
|
treeDefaultExpandAll: boolean;
|
|
1195
|
+
switcherLoadingIcon: any;
|
|
1174
1196
|
replaceFields: FieldNames;
|
|
1175
1197
|
'onUpdate:treeExpandedKeys': (keys: Key[]) => void;
|
|
1176
1198
|
'onUpdate:searchValue': (value: string) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isVNode as
|
|
1
|
+
import { isVNode as R, defineComponent as A, useSlots as F, shallowRef as _, computed as E, unref as e, createVNode as d, Fragment as g, createBlock as v, openBlock as S, resolveDynamicComponent as K, mergeProps as U, createSlots as z, renderList as M, withCtx as w, renderSlot as j, normalizeProps as q, guardReactiveProps as O } from "vue";
|
|
2
2
|
import { Space as $, Tag as H, TreeSelect as W, Spin as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import { isArray as J, omit as Q } from "lodash-unified";
|
|
5
5
|
import { useRequest as X } from "./use-request.mjs";
|
|
6
6
|
import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
|
|
7
|
-
function
|
|
8
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
7
|
+
function B(r) {
|
|
8
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !R(r);
|
|
9
9
|
}
|
|
10
|
-
const de = /* @__PURE__ */
|
|
10
|
+
const de = /* @__PURE__ */ A({
|
|
11
11
|
name: "ApFieldTreeSelect",
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
@@ -32,6 +32,7 @@ const de = /* @__PURE__ */ F({
|
|
|
32
32
|
"onUpdate:treeExpandedKeys": {},
|
|
33
33
|
"onUpdate:searchValue": {},
|
|
34
34
|
variant: {},
|
|
35
|
+
switcherLoadingIcon: {},
|
|
35
36
|
value: {},
|
|
36
37
|
children: {},
|
|
37
38
|
listHeight: {},
|
|
@@ -176,7 +177,7 @@ const de = /* @__PURE__ */ F({
|
|
|
176
177
|
expose: x,
|
|
177
178
|
emit: C
|
|
178
179
|
}) {
|
|
179
|
-
const o = r, N =
|
|
180
|
+
const o = r, N = F(), T = C, p = _(), {
|
|
180
181
|
value: f,
|
|
181
182
|
updateValue: b
|
|
182
183
|
} = Y(o, T), {
|
|
@@ -188,20 +189,20 @@ const de = /* @__PURE__ */ F({
|
|
|
188
189
|
const u = e(f), i = J(u) ? u : [u].filter(Boolean);
|
|
189
190
|
if (!i.length)
|
|
190
191
|
return d(g, null, [o.emptyText]);
|
|
191
|
-
const n = [], s = o.fieldNames?.label || "label",
|
|
192
|
+
const n = [], s = o.fieldNames?.label || "label", L = o.fieldNames?.value || "value";
|
|
192
193
|
function h(a) {
|
|
193
194
|
for (const l of a) {
|
|
194
|
-
if (i.find((
|
|
195
|
+
if (i.find((P) => P === l[L]) && n.push(l[s]), n.length === i.length)
|
|
195
196
|
return;
|
|
196
197
|
l.children?.length && h(l.children);
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
return h(e(c)), n.length ? n.length === 1 ? d("span", null, [n[0]]) : d($, {
|
|
200
201
|
size: 4
|
|
201
|
-
},
|
|
202
|
+
}, B(t = n.map((a, l) => d(H, {
|
|
202
203
|
style: "margin-right: 0px",
|
|
203
204
|
key: `${a}-${l}`
|
|
204
|
-
},
|
|
205
|
+
}, B(a) ? a : {
|
|
205
206
|
default: () => [a]
|
|
206
207
|
}))) ? t : {
|
|
207
208
|
default: () => [t]
|
|
@@ -236,10 +237,10 @@ const de = /* @__PURE__ */ F({
|
|
|
236
237
|
_: 2
|
|
237
238
|
}, [M(N, (i, n) => ({
|
|
238
239
|
name: n,
|
|
239
|
-
fn:
|
|
240
|
+
fn: w((s) => [j(t.$slots, n, q(O(s || {})))])
|
|
240
241
|
})), e(m) ? {
|
|
241
242
|
name: "notFoundContent",
|
|
242
|
-
fn:
|
|
243
|
+
fn: w(() => [d(e(G), {
|
|
243
244
|
size: "small"
|
|
244
245
|
})]),
|
|
245
246
|
key: "0"
|
|
@@ -460,6 +460,8 @@ declare function __VLS_template(): {
|
|
|
460
460
|
keyboard: boolean;
|
|
461
461
|
bordered: boolean;
|
|
462
462
|
emptyText: string;
|
|
463
|
+
changeOnWheel: boolean;
|
|
464
|
+
changeOnBlur: boolean;
|
|
463
465
|
min: ValueType;
|
|
464
466
|
max: ValueType;
|
|
465
467
|
controls: boolean;
|
|
@@ -490,13 +492,15 @@ declare function __VLS_template(): {
|
|
|
490
492
|
keyboard: boolean;
|
|
491
493
|
bordered: boolean;
|
|
492
494
|
emptyText: string;
|
|
495
|
+
changeOnWheel: boolean;
|
|
496
|
+
changeOnBlur: boolean;
|
|
493
497
|
min: ValueType;
|
|
494
498
|
max: ValueType;
|
|
495
499
|
controls: boolean;
|
|
496
500
|
thousands: boolean;
|
|
497
501
|
}> & Omit<Readonly< ApFieldNumberProps> & Readonly<{
|
|
498
502
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
499
|
-
}>, "blur" | "focus" | ("step" | "disabled" | "keyboard" | "bordered" | "emptyText" | "min" | "max" | "controls" | "thousands")> & ShallowUnwrapRef<{
|
|
503
|
+
}>, "blur" | "focus" | ("step" | "disabled" | "keyboard" | "bordered" | "emptyText" | "changeOnWheel" | "changeOnBlur" | "min" | "max" | "controls" | "thousands")> & ShallowUnwrapRef<{
|
|
500
504
|
focus: () => void;
|
|
501
505
|
blur: () => void;
|
|
502
506
|
}> & {} & ComponentCustomProperties & {} & {
|
|
@@ -966,6 +970,8 @@ declare const __VLS_component: DefineComponent<ApFormItemNumberProps, {
|
|
|
966
970
|
keyboard: boolean;
|
|
967
971
|
bordered: boolean;
|
|
968
972
|
emptyText: string;
|
|
973
|
+
changeOnWheel: boolean;
|
|
974
|
+
changeOnBlur: boolean;
|
|
969
975
|
min: ValueType;
|
|
970
976
|
max: ValueType;
|
|
971
977
|
controls: boolean;
|
|
@@ -996,13 +1002,15 @@ declare const __VLS_component: DefineComponent<ApFormItemNumberProps, {
|
|
|
996
1002
|
keyboard: boolean;
|
|
997
1003
|
bordered: boolean;
|
|
998
1004
|
emptyText: string;
|
|
1005
|
+
changeOnWheel: boolean;
|
|
1006
|
+
changeOnBlur: boolean;
|
|
999
1007
|
min: ValueType;
|
|
1000
1008
|
max: ValueType;
|
|
1001
1009
|
controls: boolean;
|
|
1002
1010
|
thousands: boolean;
|
|
1003
1011
|
}> & Omit<Readonly< ApFieldNumberProps> & Readonly<{
|
|
1004
1012
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
1005
|
-
}>, "blur" | "focus" | ("step" | "disabled" | "keyboard" | "bordered" | "emptyText" | "min" | "max" | "controls" | "thousands")> & ShallowUnwrapRef<{
|
|
1013
|
+
}>, "blur" | "focus" | ("step" | "disabled" | "keyboard" | "bordered" | "emptyText" | "changeOnWheel" | "changeOnBlur" | "min" | "max" | "controls" | "thousands")> & ShallowUnwrapRef<{
|
|
1006
1014
|
focus: () => void;
|
|
1007
1015
|
blur: () => void;
|
|
1008
1016
|
}> & {} & ComponentCustomProperties & {} & {
|