@aplus-frontend/ui 7.17.0 → 7.17.1
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/ap-field/cascader/index.vue.mjs +86 -131
- package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
- package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
- package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +48 -48
- package/es/src/ap-field/date/read.vue2.mjs +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +31 -31
- package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
- package/es/src/ap-field/interface.d.ts +7 -22
- package/es/src/ap-field/number/index.vue.mjs +36 -34
- package/es/src/ap-field/number/read.vue2.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.mjs +34 -42
- package/es/src/ap-field/radio/read.vue2.mjs +1 -1
- package/es/src/ap-field/rate/index.vue.mjs +23 -23
- package/es/src/ap-field/second/index.vue.mjs +27 -29
- package/es/src/ap-field/second/read.vue2.mjs +2 -2
- package/es/src/ap-field/segmented/index.vue.mjs +37 -37
- package/es/src/ap-field/select/index.vue.mjs +90 -92
- package/es/src/ap-field/select/read.vue2.mjs +1 -1
- package/es/src/ap-field/slider/index.vue.mjs +35 -37
- package/es/src/ap-field/switch/index.vue.mjs +38 -38
- package/es/src/ap-field/switch/read.vue2.mjs +3 -3
- package/es/src/ap-field/text/index.vue.d.ts +478 -3
- package/es/src/ap-field/text/index.vue2.mjs +47 -46
- package/es/src/ap-field/text/password.vue.d.ts +549 -3
- package/es/src/ap-field/text/password.vue.mjs +61 -56
- package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
- package/es/src/ap-field/text/read.vue2.mjs +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +29 -31
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
- package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
- package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
- package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
- package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
- package/es/src/ap-form/item/index.vue.d.ts +6 -6
- package/es/src/ap-form/item/index.vue.mjs +85 -94
- package/es/src/ap-form/item-group/index.vue.mjs +14 -14
- package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/switch/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/list/index.vue.mjs +29 -34
- package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
- package/es/src/ap-form/set/index.vue.d.ts +2 -4
- package/es/src/ap-form/set/index.vue.mjs +23 -18
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-table/constants.d.ts +593 -31
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/es/src/business/batch-input-group/index.vue.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/interface.d.ts +7 -22
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +478 -3
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +549 -3
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- 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/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
- package/lib/src/ap-form/item/index.vue.d.ts +6 -6
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/list/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.d.ts +2 -4
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +593 -31
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/lib/src/business/batch-input-group/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EyeOutlined as
|
|
3
|
-
import { Input as
|
|
4
|
-
import { omit as
|
|
5
|
-
import "../../render/index.mjs";
|
|
1
|
+
import { defineComponent as U, useSlots as _, shallowRef as E, computed as R, createBlock as a, createElementBlock as f, openBlock as o, unref as e, mergeProps as T, createSlots as V, renderList as F, withCtx as c, renderSlot as I, normalizeProps as S, guardReactiveProps as z, Fragment as M, toDisplayString as m, createElementVNode as y } from "vue";
|
|
2
|
+
import { EyeOutlined as O, EyeInvisibleOutlined as A } from "@ant-design/icons-vue";
|
|
3
|
+
import { Input as D, Flex as K } from "@aplus-frontend/antdv";
|
|
4
|
+
import { omit as N } from "lodash-unified";
|
|
6
5
|
import "../../hooks/index.mjs";
|
|
7
|
-
import { useDefaultPlaceholder as
|
|
8
|
-
import { useControllableValue as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
const J = /* @__PURE__ */ h({
|
|
6
|
+
import { useDefaultPlaceholder as $ } from "../hooks/use-default-placeholder.mjs";
|
|
7
|
+
import { useControllableValue as v } from "../../hooks/useControllableValue.mjs";
|
|
8
|
+
const j = {
|
|
9
|
+
key: 0
|
|
10
|
+
}, Z = /* @__PURE__ */ U({
|
|
14
11
|
name: "ApFieldTextPassword",
|
|
15
12
|
__name: "password",
|
|
16
13
|
props: {
|
|
@@ -19,6 +16,9 @@ const J = /* @__PURE__ */ h({
|
|
|
19
16
|
},
|
|
20
17
|
class: {},
|
|
21
18
|
style: {},
|
|
19
|
+
emptyText: {
|
|
20
|
+
default: "--"
|
|
21
|
+
},
|
|
22
22
|
variant: {},
|
|
23
23
|
size: {},
|
|
24
24
|
value: {},
|
|
@@ -102,60 +102,65 @@ const J = /* @__PURE__ */ h({
|
|
|
102
102
|
type: Boolean,
|
|
103
103
|
default: void 0
|
|
104
104
|
},
|
|
105
|
-
"onUpdate:visible": {}
|
|
106
|
-
emptyText: {
|
|
107
|
-
default: "--"
|
|
108
|
-
}
|
|
105
|
+
"onUpdate:visible": {}
|
|
109
106
|
},
|
|
110
107
|
emits: ["update:value", "update:visible"],
|
|
111
|
-
setup(
|
|
112
|
-
expose:
|
|
113
|
-
emit:
|
|
108
|
+
setup(b, {
|
|
109
|
+
expose: B,
|
|
110
|
+
emit: g
|
|
114
111
|
}) {
|
|
115
|
-
const
|
|
116
|
-
value:
|
|
117
|
-
updateValue:
|
|
118
|
-
} =
|
|
119
|
-
value:
|
|
112
|
+
const h = _(), i = g, t = b, n = E(), {
|
|
113
|
+
value: s,
|
|
114
|
+
updateValue: x
|
|
115
|
+
} = v(t, i), k = $("TextPassword", t), {
|
|
116
|
+
value: l,
|
|
120
117
|
updateValue: r
|
|
121
|
-
} =
|
|
118
|
+
} = v(t, i, {
|
|
122
119
|
valuePropName: "visible"
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const n = a(m), l = a(b);
|
|
126
|
-
if (o.mode === "edit")
|
|
127
|
-
return e(T.Password, C(O(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
|
|
128
|
-
placeholder: a(y),
|
|
129
|
-
value: n,
|
|
130
|
-
"onUpdate:value": v,
|
|
131
|
-
visible: l,
|
|
132
|
-
"onUpdate:visible": r,
|
|
133
|
-
ref: i
|
|
134
|
-
}), k(u) ? u : {
|
|
135
|
-
default: () => [u]
|
|
136
|
-
});
|
|
137
|
-
let d = e(P, null, [o.emptyText]);
|
|
138
|
-
return n && (d = e(I, null, {
|
|
139
|
-
default: () => [e("span", null, [l ? n : "********"]), e("span", {
|
|
140
|
-
style: {
|
|
141
|
-
cursor: "pointer"
|
|
142
|
-
},
|
|
143
|
-
onClick: () => r(!l)
|
|
144
|
-
}, [l ? e(_, null, null) : e(S, null, null)])]
|
|
145
|
-
})), d;
|
|
146
|
-
}
|
|
147
|
-
return c({
|
|
120
|
+
}), w = R(() => N(t, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]));
|
|
121
|
+
return B({
|
|
148
122
|
focus: () => {
|
|
149
|
-
|
|
123
|
+
n.value?.focus();
|
|
150
124
|
},
|
|
151
125
|
blur: () => {
|
|
152
|
-
|
|
126
|
+
n.value?.blur();
|
|
153
127
|
}
|
|
154
|
-
}), (
|
|
155
|
-
|
|
156
|
-
},
|
|
128
|
+
}), (u, p) => u.mode === "edit" ? (o(), a(e(D).Password, T({
|
|
129
|
+
key: 0
|
|
130
|
+
}, w.value, {
|
|
131
|
+
ref_key: "inputRef",
|
|
132
|
+
ref: n,
|
|
133
|
+
placeholder: e(k),
|
|
134
|
+
value: e(s),
|
|
135
|
+
visible: e(l),
|
|
136
|
+
"onUpdate:value": e(x),
|
|
137
|
+
"onUpdate:visible": e(r)
|
|
138
|
+
}), V({
|
|
139
|
+
_: 2
|
|
140
|
+
}, [F(h, (C, d) => ({
|
|
141
|
+
name: d,
|
|
142
|
+
fn: c((P) => [I(u.$slots, d, S(z(P || {})))])
|
|
143
|
+
}))]), 1040, ["placeholder", "value", "visible", "onUpdate:value", "onUpdate:visible"])) : (o(), f(M, {
|
|
144
|
+
key: 1
|
|
145
|
+
}, [e(s) ? (o(), a(e(K), {
|
|
146
|
+
key: 1,
|
|
147
|
+
gap: 8,
|
|
148
|
+
align: "center"
|
|
149
|
+
}, {
|
|
150
|
+
default: c(() => [y("span", null, m(e(l) ? e(s) : "********"), 1), y("span", {
|
|
151
|
+
style: {
|
|
152
|
+
cursor: "pointer"
|
|
153
|
+
},
|
|
154
|
+
onClick: p[0] || (p[0] = (C) => e(r)(!e(l)))
|
|
155
|
+
}, [e(l) ? (o(), a(e(O), {
|
|
156
|
+
key: 0
|
|
157
|
+
})) : (o(), a(e(A), {
|
|
158
|
+
key: 1
|
|
159
|
+
}))])]),
|
|
160
|
+
_: 1
|
|
161
|
+
})) : (o(), f("span", j, m(u.emptyText), 1))], 64));
|
|
157
162
|
}
|
|
158
163
|
});
|
|
159
164
|
export {
|
|
160
|
-
|
|
165
|
+
Z as default
|
|
161
166
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as d,
|
|
2
|
-
import { EyeOutlined as
|
|
1
|
+
import { defineComponent as d, ref as p, createElementBlock as s, createBlock as a, openBlock as o, Fragment as f, createTextVNode as y, toDisplayString as u, unref as l, withCtx as c, createElementVNode as i } from "vue";
|
|
2
|
+
import { EyeOutlined as m, EyeInvisibleOutlined as v } from "@ant-design/icons-vue";
|
|
3
3
|
import { Space as B } from "@aplus-frontend/antdv";
|
|
4
|
-
const
|
|
4
|
+
const k = /* @__PURE__ */ d({
|
|
5
5
|
name: "ApFieldTextPasswordRead",
|
|
6
6
|
__name: "read-password",
|
|
7
7
|
props: {
|
|
8
8
|
mode: { default: "edit" },
|
|
9
9
|
class: {},
|
|
10
10
|
style: {},
|
|
11
|
+
emptyText: { default: "--" },
|
|
11
12
|
variant: {},
|
|
12
13
|
size: {},
|
|
13
14
|
value: {},
|
|
@@ -57,27 +58,26 @@ const g = /* @__PURE__ */ d({
|
|
|
57
58
|
action: { default: "click" },
|
|
58
59
|
visibilityToggle: { type: Boolean, default: !0 },
|
|
59
60
|
visible: { type: Boolean, default: void 0 },
|
|
60
|
-
"onUpdate:visible": {}
|
|
61
|
-
emptyText: { default: "--" }
|
|
61
|
+
"onUpdate:visible": {}
|
|
62
62
|
},
|
|
63
|
-
setup(
|
|
64
|
-
const
|
|
65
|
-
return (
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
setup(r) {
|
|
64
|
+
const e = p(r.visible);
|
|
65
|
+
return (t, n) => t.value ? (o(), a(l(B), { key: 1 }, {
|
|
66
|
+
default: c(() => [
|
|
67
|
+
i("span", null, u(e.value ? t.value : "********"), 1),
|
|
68
|
+
i("span", {
|
|
69
69
|
style: { cursor: "pointer" },
|
|
70
|
-
onClick:
|
|
70
|
+
onClick: n[0] || (n[0] = () => e.value = !e.value)
|
|
71
71
|
}, [
|
|
72
|
-
e
|
|
72
|
+
e.value ? (o(), a(l(m), { key: 0 })) : (o(), a(l(v), { key: 1 }))
|
|
73
73
|
])
|
|
74
74
|
]),
|
|
75
75
|
_: 1
|
|
76
|
-
})) : (
|
|
77
|
-
|
|
76
|
+
})) : (o(), s(f, { key: 0 }, [
|
|
77
|
+
y(u(t.emptyText), 1)
|
|
78
78
|
], 64));
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
k as default
|
|
83
83
|
};
|
|
@@ -6,6 +6,7 @@ const r = /* @__PURE__ */ a({
|
|
|
6
6
|
mode: { default: "edit" },
|
|
7
7
|
class: {},
|
|
8
8
|
style: {},
|
|
9
|
+
emptyText: { default: "--" },
|
|
9
10
|
variant: {},
|
|
10
11
|
size: {},
|
|
11
12
|
value: {},
|
|
@@ -51,7 +52,6 @@ const r = /* @__PURE__ */ a({
|
|
|
51
52
|
suffix: {},
|
|
52
53
|
clearIcon: {},
|
|
53
54
|
allowClear: { type: Boolean, default: !0 },
|
|
54
|
-
emptyText: { default: "--" },
|
|
55
55
|
beforeInput: {}
|
|
56
56
|
},
|
|
57
57
|
setup(t) {
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Input as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as k, shallowRef as z, computed as s, createElementBlock as p, createBlock as T, openBlock as n, Fragment as w, normalizeClass as m, unref as e, toDisplayString as f, createElementVNode as R, mergeProps as F } from "vue";
|
|
2
|
+
import { Input as S } from "@aplus-frontend/antdv";
|
|
3
|
+
import { omit as V, isNil as E } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
6
|
+
import { useDefaultPlaceholder as P } from "../hooks/use-default-placeholder.mjs";
|
|
7
7
|
import U from "../style/index.mjs";
|
|
8
8
|
import { languageFormat as _ } from "./utils.mjs";
|
|
9
9
|
import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
|
|
10
10
|
import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const
|
|
11
|
+
const Q = /* @__PURE__ */ k({
|
|
12
12
|
name: "ApFieldTextArea",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
15
15
|
mode: { default: "edit" },
|
|
16
16
|
class: {},
|
|
17
17
|
style: {},
|
|
18
|
+
emptyText: { default: "--" },
|
|
18
19
|
rows: {},
|
|
19
20
|
autoSize: { type: [Boolean, Object] },
|
|
20
21
|
onResize: {},
|
|
@@ -59,13 +60,14 @@ const L = /* @__PURE__ */ A({
|
|
|
59
60
|
handleReset: {},
|
|
60
61
|
clearIcon: {},
|
|
61
62
|
allowClear: { type: Boolean, default: !0 },
|
|
62
|
-
emptyText: { default: "--" },
|
|
63
63
|
beforeInput: {},
|
|
64
64
|
code: { type: [Boolean, Object], default: !1 }
|
|
65
65
|
},
|
|
66
66
|
emits: ["update:value"],
|
|
67
67
|
setup(y, { expose: g, emit: v }) {
|
|
68
|
-
const a =
|
|
68
|
+
const a = z(), o = y, x = s(
|
|
69
|
+
() => V(o, ["onUpdate:value", "value", "beforeInput", "emptyText"])
|
|
70
|
+
), h = v, { value: l, updateValue: B } = j(o, h), { b, m: d } = M("field-textarea"), r = U("field"), I = P("TextArea", o), C = s(() => {
|
|
69
71
|
if (o.code)
|
|
70
72
|
return o.code === !0 ? {
|
|
71
73
|
language: "text"
|
|
@@ -73,9 +75,9 @@ const L = /* @__PURE__ */ A({
|
|
|
73
75
|
language: o.code?.language ?? "text"
|
|
74
76
|
};
|
|
75
77
|
});
|
|
76
|
-
function
|
|
77
|
-
const u = t.target.value || "",
|
|
78
|
-
|
|
78
|
+
function A(t) {
|
|
79
|
+
const u = t.target.value || "", i = o.beforeInput ? o.beforeInput?.(u) : u, c = a.value?.$el?.querySelector("textarea");
|
|
80
|
+
c && (c.value = i), B(i);
|
|
79
81
|
}
|
|
80
82
|
return g({
|
|
81
83
|
focus: (t) => {
|
|
@@ -84,31 +86,27 @@ const L = /* @__PURE__ */ A({
|
|
|
84
86
|
blur: () => {
|
|
85
87
|
a.value?.blur();
|
|
86
88
|
},
|
|
87
|
-
resizableTextArea:
|
|
88
|
-
}), (t, u) => t.mode === "read" ? (n(),
|
|
89
|
-
t.code ? (n(),
|
|
89
|
+
resizableTextArea: s(() => a.value?.resizableTextArea)
|
|
90
|
+
}), (t, u) => t.mode === "read" ? (n(), p(w, { key: 0 }, [
|
|
91
|
+
t.code ? (n(), p("pre", {
|
|
90
92
|
key: 1,
|
|
91
|
-
class: m([e(
|
|
93
|
+
class: m([e(d)("code"), e(r)])
|
|
92
94
|
}, [
|
|
93
|
-
|
|
94
|
-
], 2)) : (n(),
|
|
95
|
+
R("code", null, f(e(_)(e(l), C.value.language)), 1)
|
|
96
|
+
], 2)) : (n(), p("span", {
|
|
95
97
|
key: 0,
|
|
96
|
-
class: m([e(
|
|
97
|
-
}, f(e(
|
|
98
|
-
], 64)) : (n(),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class: [e(B)(), e(r)],
|
|
107
|
-
onInput: C
|
|
108
|
-
}
|
|
109
|
-
), null, 16, ["placeholder", "value", "class"]));
|
|
98
|
+
class: m([e(d)("read"), e(r)])
|
|
99
|
+
}, f(e(E)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3))
|
|
100
|
+
], 64)) : (n(), T(e(S).TextArea, F({ key: 1 }, x.value, {
|
|
101
|
+
ref_key: "textAreaRef",
|
|
102
|
+
ref: a,
|
|
103
|
+
placeholder: e(I),
|
|
104
|
+
value: e(l),
|
|
105
|
+
class: [e(b)(), e(r)],
|
|
106
|
+
onInput: A
|
|
107
|
+
}), null, 16, ["placeholder", "value", "class"]));
|
|
110
108
|
}
|
|
111
109
|
});
|
|
112
110
|
export {
|
|
113
|
-
|
|
111
|
+
Q as default
|
|
114
112
|
};
|
|
@@ -18,6 +18,7 @@ const h = {
|
|
|
18
18
|
mode: { default: "edit" },
|
|
19
19
|
class: {},
|
|
20
20
|
style: {},
|
|
21
|
+
emptyText: { default: "--" },
|
|
21
22
|
rows: {},
|
|
22
23
|
autoSize: { type: [Boolean, Object] },
|
|
23
24
|
onResize: {},
|
|
@@ -62,7 +63,6 @@ const h = {
|
|
|
62
63
|
handleReset: {},
|
|
63
64
|
clearIcon: {},
|
|
64
65
|
allowClear: { type: Boolean, default: !0 },
|
|
65
|
-
emptyText: { default: "--" },
|
|
66
66
|
beforeInput: {},
|
|
67
67
|
code: { type: [Boolean, Object], default: !1 }
|
|
68
68
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Space as
|
|
3
|
-
import {
|
|
1
|
+
import { isVNode as _, defineComponent as E, computed as g, useSlots as K, shallowRef as U, unref as e, createVNode as r, Fragment as v, createBlock as S, openBlock as w, resolveDynamicComponent as z, mergeProps as M, createSlots as j, renderList as q, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as H } from "vue";
|
|
2
|
+
import { Space as W, Tag as G, TreeSelect as J, Spin as Q } from "@aplus-frontend/antdv";
|
|
3
|
+
import { omit as X, isArray as Y } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { useDefaultPlaceholder as
|
|
6
|
-
import { useRequest as
|
|
7
|
-
import { useControllableValue as
|
|
8
|
-
function
|
|
9
|
-
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !
|
|
5
|
+
import { useDefaultPlaceholder as Z } from "../hooks/use-default-placeholder.mjs";
|
|
6
|
+
import { useRequest as ee } from "./use-request.mjs";
|
|
7
|
+
import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
|
|
8
|
+
function C(d) {
|
|
9
|
+
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !_(d);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const pe = /* @__PURE__ */ E({
|
|
12
12
|
name: "ApFieldTreeSelect",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -17,6 +17,9 @@ const ie = /* @__PURE__ */ F({
|
|
|
17
17
|
},
|
|
18
18
|
class: {},
|
|
19
19
|
style: {},
|
|
20
|
+
emptyText: {
|
|
21
|
+
default: "--"
|
|
22
|
+
},
|
|
20
23
|
suffixIcon: {},
|
|
21
24
|
size: {},
|
|
22
25
|
bordered: {
|
|
@@ -161,9 +164,6 @@ const ie = /* @__PURE__ */ F({
|
|
|
161
164
|
switcherIcon: {},
|
|
162
165
|
treeExpandAction: {},
|
|
163
166
|
dropdownPopupAlign: {},
|
|
164
|
-
emptyText: {
|
|
165
|
-
default: "--"
|
|
166
|
-
},
|
|
167
167
|
request: {},
|
|
168
168
|
lazy: {
|
|
169
169
|
type: Boolean
|
|
@@ -175,76 +175,76 @@ const ie = /* @__PURE__ */ F({
|
|
|
175
175
|
},
|
|
176
176
|
emits: ["update:value"],
|
|
177
177
|
setup(d, {
|
|
178
|
-
expose:
|
|
179
|
-
emit:
|
|
178
|
+
expose: x,
|
|
179
|
+
emit: N
|
|
180
180
|
}) {
|
|
181
|
-
const n = d,
|
|
182
|
-
value:
|
|
183
|
-
updateValue:
|
|
184
|
-
} =
|
|
185
|
-
treeData:
|
|
181
|
+
const n = d, T = g(() => X(n, ["onUpdate:value", "value", "treeData", "loadData"])), b = K(), D = N, p = U(), {
|
|
182
|
+
value: c,
|
|
183
|
+
updateValue: V
|
|
184
|
+
} = te(n, D), k = Z("TreeSelect", n), {
|
|
185
|
+
treeData: f,
|
|
186
186
|
loading: m,
|
|
187
187
|
request: y
|
|
188
|
-
} =
|
|
188
|
+
} = ee(n), P = g(() => {
|
|
189
189
|
let t;
|
|
190
|
-
const u = e(
|
|
190
|
+
const u = e(c), i = Y(u) ? u : [u].filter(Boolean);
|
|
191
191
|
if (!i.length)
|
|
192
|
-
return r(
|
|
193
|
-
const o = [], s = n.fieldNames?.label || "label",
|
|
192
|
+
return r(v, null, [n.emptyText]);
|
|
193
|
+
const o = [], s = n.fieldNames?.label || "label", A = n.fieldNames?.value || "value";
|
|
194
194
|
function h(a) {
|
|
195
195
|
for (const l of a) {
|
|
196
|
-
if (i.find((
|
|
196
|
+
if (i.find((F) => F === l[A]) && o.push(l[s]), o.length === i.length)
|
|
197
197
|
return;
|
|
198
198
|
l.children?.length && h(l.children);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
return h(e(
|
|
201
|
+
return h(e(f)), o.length ? o.length === 1 ? r("span", null, [o[0]]) : r(W, {
|
|
202
202
|
size: 4
|
|
203
|
-
},
|
|
203
|
+
}, C(t = o.map((a, l) => r(G, {
|
|
204
204
|
style: {
|
|
205
205
|
marginRight: 0
|
|
206
206
|
},
|
|
207
207
|
key: `${a}-${l}`
|
|
208
|
-
},
|
|
208
|
+
}, C(a) ? a : {
|
|
209
209
|
default: () => [a]
|
|
210
210
|
}))) ? t : {
|
|
211
211
|
default: () => [t]
|
|
212
|
-
}) : r(
|
|
212
|
+
}) : r(v, null, [n.emptyText]);
|
|
213
213
|
});
|
|
214
|
-
function
|
|
214
|
+
function I() {
|
|
215
215
|
p.value?.focus?.();
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function R() {
|
|
218
218
|
p.value?.blur?.();
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function L(t) {
|
|
221
221
|
return y(t);
|
|
222
222
|
}
|
|
223
|
-
return
|
|
223
|
+
return x({
|
|
224
224
|
request: y,
|
|
225
|
-
focus:
|
|
226
|
-
blur:
|
|
227
|
-
}), (t, u) => t.mode === "read" ? (
|
|
225
|
+
focus: I,
|
|
226
|
+
blur: R
|
|
227
|
+
}), (t, u) => t.mode === "read" ? (w(), S(z(P.value), {
|
|
228
228
|
key: 0
|
|
229
|
-
})) : (
|
|
229
|
+
})) : (w(), S(e(J), M({
|
|
230
230
|
key: 1
|
|
231
|
-
},
|
|
231
|
+
}, T.value, {
|
|
232
232
|
ref_key: "treeSelectRef",
|
|
233
233
|
ref: p,
|
|
234
|
-
value: e(
|
|
235
|
-
"tree-data": e(
|
|
234
|
+
value: e(c),
|
|
235
|
+
"tree-data": e(f),
|
|
236
236
|
loading: e(m),
|
|
237
|
-
placeholder: e(
|
|
238
|
-
"load-data": t.loadData ?
|
|
239
|
-
"onUpdate:value": e(
|
|
240
|
-
}),
|
|
237
|
+
placeholder: e(k),
|
|
238
|
+
"load-data": t.loadData ? L : void 0,
|
|
239
|
+
"onUpdate:value": e(V)
|
|
240
|
+
}), j({
|
|
241
241
|
_: 2
|
|
242
|
-
}, [
|
|
242
|
+
}, [q(b, (i, o) => ({
|
|
243
243
|
name: o,
|
|
244
|
-
fn:
|
|
244
|
+
fn: B((s) => [O(t.$slots, o, $(H(s || {})))])
|
|
245
245
|
})), e(m) ? {
|
|
246
246
|
name: "notFoundContent",
|
|
247
|
-
fn:
|
|
247
|
+
fn: B(() => [r(e(Q), {
|
|
248
248
|
size: "small"
|
|
249
249
|
})]),
|
|
250
250
|
key: "0"
|
|
@@ -252,5 +252,5 @@ const ie = /* @__PURE__ */ F({
|
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
export {
|
|
255
|
-
|
|
255
|
+
pe as default
|
|
256
256
|
};
|
|
@@ -13,6 +13,9 @@ const I = /* @__PURE__ */ g({
|
|
|
13
13
|
},
|
|
14
14
|
class: {},
|
|
15
15
|
style: {},
|
|
16
|
+
emptyText: {
|
|
17
|
+
default: "--"
|
|
18
|
+
},
|
|
16
19
|
suffixIcon: {},
|
|
17
20
|
size: {},
|
|
18
21
|
bordered: {
|
|
@@ -139,9 +142,6 @@ const I = /* @__PURE__ */ g({
|
|
|
139
142
|
switcherIcon: {},
|
|
140
143
|
treeExpandAction: {},
|
|
141
144
|
dropdownPopupAlign: {},
|
|
142
|
-
emptyText: {
|
|
143
|
-
default: "--"
|
|
144
|
-
},
|
|
145
145
|
request: {},
|
|
146
146
|
lazy: {
|
|
147
147
|
type: Boolean
|