@aplus-frontend/ui 0.0.13 → 0.0.15
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/index.mjs +53 -55
- package/es/src/ap-action/interface.d.ts +11 -0
- package/es/src/ap-action/item/index.vue.d.ts +2 -4
- package/es/src/ap-action/item/index.vue2.mjs +34 -28
- package/es/src/ap-action/item-modal/index.vue.d.ts +8 -3
- package/es/src/ap-action/item-modal/index.vue.mjs +20 -13
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +8 -3
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +23 -16
- package/es/src/ap-field/checkbox/index.vue.mjs +2 -0
- package/es/src/ap-field/date/index.vue.mjs +2 -0
- package/es/src/ap-field/date-range/index.vue.mjs +2 -0
- package/es/src/ap-field/interface.d.ts +2 -0
- package/es/src/ap-field/number/index.vue.mjs +2 -0
- package/es/src/ap-field/radio/index.vue.mjs +9 -7
- package/es/src/ap-field/rate/index.vue.mjs +4 -2
- package/es/src/ap-field/segmented/index.vue.mjs +15 -13
- package/es/src/ap-field/select/index.vue.mjs +18 -16
- package/es/src/ap-field/slider/index.vue.mjs +11 -9
- package/es/src/ap-field/switch/index.vue.mjs +10 -8
- package/es/src/ap-field/text/index.vue.d.ts +1 -1
- package/es/src/ap-field/text/index.vue2.mjs +12 -10
- package/es/src/ap-field/text/password.vue.d.ts +1 -1
- package/es/src/ap-field/text/password.vue.mjs +16 -14
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +2 -0
- package/es/src/ap-form/ap-form-item.vue.mjs +45 -42
- package/es/src/ap-form/modal-form/index.vue.mjs +68 -66
- package/es/src/ap-table/ap-table.vue.mjs +90 -92
- package/es/src/ap-table/constants.d.ts +715 -487
- package/es/src/ap-table/style/ap-table.css +6 -0
- package/es/src/ap-table/utils.d.ts +3 -3
- package/es/src/business/index.d.ts +2 -5
- package/es/src/business/index.mjs +4 -5
- package/es/src/business/title/ApTitle.vue.mjs +2 -48
- package/es/src/business/title/ApTitle.vue2.mjs +48 -2
- package/es/src/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider-props.mjs +5 -6
- package/es/src/config-provider/config-provider.d.ts +11 -11
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/es/src/config-provider/index.d.ts +31 -31
- package/es/src/description/description.vue.d.ts +1 -1
- package/es/src/description/index.d.ts +3 -3
- package/es/src/editable-table/form-item.vue.d.ts +1 -1
- package/es/src/editable-table/style/index.css +7 -8
- package/es/src/icon-picker/icon-picker.vue.d.ts +2 -2
- package/es/src/icon-picker/index.d.ts +26 -26
- package/es/src/index.mjs +50 -52
- package/es/src/modal/basic.vue.d.ts +1 -1
- package/es/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/es/src/modal/index.d.ts +2 -2
- package/es/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/es/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/es/src/pro-form/hooks/use-label-width.d.ts +6 -6
- package/es/src/pro-form/pro-form.vue.d.ts +1 -1
- package/es/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/es/src/pro-table/pro-table.vue.d.ts +1 -1
- package/es/src/scroll-bar/index.d.ts +12 -12
- package/es/src/theme/ap-table/ap-table.css +6 -0
- package/es/src/theme/editable-table/index.css +7 -8
- package/es/src/utils/config-provider-preset.d.ts +12 -12
- package/lib/index.js +1 -1
- package/lib/src/ap-action/interface.d.ts +11 -0
- package/lib/src/ap-action/item/index.vue.d.ts +2 -4
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-modal/index.vue.d.ts +8 -3
- package/lib/src/ap-action/item-modal/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +8 -3
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +2 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.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/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +715 -487
- package/lib/src/ap-table/style/ap-table.css +6 -0
- package/lib/src/ap-table/utils.d.ts +3 -3
- package/lib/src/business/index.d.ts +2 -5
- package/lib/src/business/index.js +1 -1
- package/lib/src/business/title/ApTitle.vue.js +1 -1
- package/lib/src/business/title/ApTitle.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +11 -11
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/lib/src/config-provider/index.d.ts +31 -31
- package/lib/src/description/description.vue.d.ts +1 -1
- package/lib/src/description/index.d.ts +3 -3
- package/lib/src/editable-table/form-item.vue.d.ts +1 -1
- package/lib/src/editable-table/style/index.css +7 -8
- package/lib/src/icon-picker/icon-picker.vue.d.ts +2 -2
- package/lib/src/icon-picker/index.d.ts +26 -26
- package/lib/src/index.js +1 -1
- package/lib/src/modal/basic.vue.d.ts +1 -1
- package/lib/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/lib/src/modal/index.d.ts +2 -2
- package/lib/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/lib/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +6 -6
- package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
- package/lib/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/lib/src/pro-table/pro-table.vue.d.ts +1 -1
- package/lib/src/scroll-bar/index.d.ts +12 -12
- package/lib/src/theme/ap-table/ap-table.css +6 -0
- package/lib/src/theme/editable-table/index.css +7 -8
- package/lib/src/utils/config-provider-preset.d.ts +12 -12
- package/package.json +1 -1
|
@@ -8,6 +8,8 @@ const D = /* @__PURE__ */ v({
|
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
mode: { default: "edit" },
|
|
11
|
+
class: {},
|
|
12
|
+
style: {},
|
|
11
13
|
prefixCls: {},
|
|
12
14
|
count: { default: 5 },
|
|
13
15
|
value: {},
|
|
@@ -30,7 +32,7 @@ const D = /* @__PURE__ */ v({
|
|
|
30
32
|
},
|
|
31
33
|
emits: ["update:value"],
|
|
32
34
|
setup(r, { expose: u, emit: n }) {
|
|
33
|
-
const a = r, l = b(),
|
|
35
|
+
const a = r, l = b(), s = n, d = h(), { value: f, updateValue: c } = V(a, s), i = y(() => a.mode === "read" ? !0 : a.disabled);
|
|
34
36
|
function p() {
|
|
35
37
|
var e, t;
|
|
36
38
|
(t = (e = l.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
@@ -49,7 +51,7 @@ const D = /* @__PURE__ */ v({
|
|
|
49
51
|
ref_key: "rateRef",
|
|
50
52
|
ref: l
|
|
51
53
|
}), x({ _: 2 }, [
|
|
52
|
-
|
|
54
|
+
d.character ? {
|
|
53
55
|
name: "character",
|
|
54
56
|
fn: g(() => [
|
|
55
57
|
k(e.$slots, "character")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, ref as c, useSlots as B, onMounted as U, computed as V, unref as
|
|
1
|
+
import { defineComponent as S, ref as c, useSlots as B, onMounted as U, computed as V, unref as a, createVNode as s, Fragment as o, openBlock as r, createBlock as m, createElementBlock as _, resolveDynamicComponent as h, mergeProps as N, withCtx as q, renderSlot as z, normalizeProps as F, guardReactiveProps as P } from "vue";
|
|
2
2
|
import { Spin as T, Segmented as R } from "ant-design-vue";
|
|
3
3
|
import { isFunction as v, isUndefined as w, isString as A, isNumber as D, omit as E } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
@@ -10,6 +10,8 @@ const J = /* @__PURE__ */ S({
|
|
|
10
10
|
mode: {
|
|
11
11
|
default: "edit"
|
|
12
12
|
},
|
|
13
|
+
class: {},
|
|
14
|
+
style: {},
|
|
13
15
|
prefixCls: {},
|
|
14
16
|
options: {},
|
|
15
17
|
block: {
|
|
@@ -46,29 +48,29 @@ const J = /* @__PURE__ */ S({
|
|
|
46
48
|
});
|
|
47
49
|
const C = V(() => {
|
|
48
50
|
var f;
|
|
49
|
-
const t =
|
|
51
|
+
const t = a(p);
|
|
50
52
|
if (w(t))
|
|
51
|
-
return s(
|
|
52
|
-
const l = (f =
|
|
53
|
+
return s(o, null, [e.emptyText]);
|
|
54
|
+
const l = (f = a(i)) == null ? void 0 : f.find((u) => u === t || (u == null ? void 0 : u.value) === t);
|
|
53
55
|
if (A(l) || D(l))
|
|
54
|
-
return s(
|
|
56
|
+
return s(o, null, [l]);
|
|
55
57
|
const n = (l == null ? void 0 : l.label) || x.label;
|
|
56
|
-
return v(n) ? s(
|
|
58
|
+
return v(n) ? s(o, null, [n == null ? void 0 : n({
|
|
57
59
|
...l
|
|
58
|
-
})]) : s(
|
|
60
|
+
})]) : s(o, null, [n || e.emptyText]);
|
|
59
61
|
});
|
|
60
|
-
return (t, l) => d.value ? (r(), m(
|
|
62
|
+
return (t, l) => d.value ? (r(), m(a(T), {
|
|
61
63
|
key: 0,
|
|
62
64
|
size: "small"
|
|
63
|
-
})) : (r(), _(
|
|
65
|
+
})) : (r(), _(o, {
|
|
64
66
|
key: 1
|
|
65
67
|
}, [t.mode === "read" ? (r(), m(h(C.value), {
|
|
66
68
|
key: 0
|
|
67
|
-
})) : (r(), m(
|
|
69
|
+
})) : (r(), m(a(R), N({
|
|
68
70
|
key: 1
|
|
69
|
-
},
|
|
70
|
-
value:
|
|
71
|
-
"onUpdate:value":
|
|
71
|
+
}, a(E)(e, ["onUpdate:value", "value", "defaultValue", "options"]), {
|
|
72
|
+
value: a(p),
|
|
73
|
+
"onUpdate:value": a(b),
|
|
72
74
|
options: i.value
|
|
73
75
|
}), {
|
|
74
76
|
label: q((n) => [z(t.$slots, "label", F(P(n)))]),
|
|
@@ -9,6 +9,8 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
11
11
|
mode: { default: "edit" },
|
|
12
|
+
class: {},
|
|
13
|
+
style: {},
|
|
12
14
|
defaultValue: {},
|
|
13
15
|
notFoundContent: {},
|
|
14
16
|
suffixIcon: {},
|
|
@@ -95,20 +97,20 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
95
97
|
return;
|
|
96
98
|
r += 1;
|
|
97
99
|
const t = r;
|
|
98
|
-
i.value = [],
|
|
99
|
-
r === t && (i.value =
|
|
100
|
+
i.value = [], n.value = !0, e.request(o).then((l) => {
|
|
101
|
+
r === t && (i.value = l);
|
|
100
102
|
}).finally(() => {
|
|
101
|
-
|
|
103
|
+
n.value = !1;
|
|
102
104
|
});
|
|
103
|
-
}, 300), e = y, i = c((e == null ? void 0 : e.options) || []), d = c(),
|
|
105
|
+
}, 300), e = y, i = c((e == null ? void 0 : e.options) || []), d = c(), n = c((e == null ? void 0 : e.loading) || !1), C = g;
|
|
104
106
|
k(() => {
|
|
105
107
|
if (h(e.request)) {
|
|
106
|
-
|
|
108
|
+
n.value = !0, r += 1;
|
|
107
109
|
const o = r;
|
|
108
110
|
e.request().then((t) => {
|
|
109
111
|
o === r && (i.value = t);
|
|
110
112
|
}).finally(() => {
|
|
111
|
-
|
|
113
|
+
n.value = !1;
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
});
|
|
@@ -118,21 +120,21 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
118
120
|
return e.emptyText;
|
|
119
121
|
if (z(o))
|
|
120
122
|
return o.map(
|
|
121
|
-
(
|
|
123
|
+
(l) => {
|
|
122
124
|
var u;
|
|
123
|
-
return (u = a(i).find((s) => s.value ===
|
|
125
|
+
return (u = a(i).find((s) => s.value === l)) == null ? void 0 : u.label;
|
|
124
126
|
}
|
|
125
127
|
).filter(Boolean).join("、") || e.emptyText;
|
|
126
|
-
const t = a(i).find((
|
|
128
|
+
const t = a(i).find((l) => l.value === o);
|
|
127
129
|
return (t == null ? void 0 : t.label) || e.emptyText;
|
|
128
130
|
}), F = p(() => {
|
|
129
131
|
const o = !!(e != null && e.showSearch), t = e.searchMode;
|
|
130
|
-
let
|
|
131
|
-
return o && (
|
|
132
|
+
let l = {};
|
|
133
|
+
return o && (l = t === "request" ? {
|
|
132
134
|
showArrow: !1,
|
|
133
135
|
defaultActiveFirstOption: !1,
|
|
134
136
|
onSearch: B,
|
|
135
|
-
notFoundContent:
|
|
137
|
+
notFoundContent: n.value ? void 0 : null
|
|
136
138
|
} : {
|
|
137
139
|
showArrow: !0,
|
|
138
140
|
filterOption: K(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
|
|
@@ -147,7 +149,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
147
149
|
"searchMode"
|
|
148
150
|
])
|
|
149
151
|
),
|
|
150
|
-
...
|
|
152
|
+
...l
|
|
151
153
|
};
|
|
152
154
|
});
|
|
153
155
|
function I() {
|
|
@@ -171,15 +173,15 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
171
173
|
value: a(f),
|
|
172
174
|
"onUpdate:value": a(b),
|
|
173
175
|
options: i.value,
|
|
174
|
-
loading:
|
|
176
|
+
loading: n.value
|
|
175
177
|
}), q({ _: 2 }, [
|
|
176
|
-
N(o.$slots, (
|
|
178
|
+
N(o.$slots, (l, u) => ({
|
|
177
179
|
name: u,
|
|
178
180
|
fn: v((s) => [
|
|
179
181
|
_(o.$slots, u, R(U(s || {})))
|
|
180
182
|
])
|
|
181
183
|
})),
|
|
182
|
-
|
|
184
|
+
n.value ? {
|
|
183
185
|
name: "notFoundContent",
|
|
184
186
|
fn: v(() => [
|
|
185
187
|
D(a(j), { size: "small" })
|
|
@@ -8,6 +8,8 @@ const I = /* @__PURE__ */ x({
|
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
mode: {},
|
|
11
|
+
class: {},
|
|
12
|
+
style: {},
|
|
11
13
|
id: {},
|
|
12
14
|
prefixCls: {},
|
|
13
15
|
tooltipPrefixCls: {},
|
|
@@ -39,30 +41,30 @@ const I = /* @__PURE__ */ x({
|
|
|
39
41
|
emptyText: { default: "--" }
|
|
40
42
|
},
|
|
41
43
|
emits: ["update:value"],
|
|
42
|
-
setup(p, { expose:
|
|
43
|
-
const d = g(),
|
|
44
|
-
|
|
44
|
+
setup(p, { expose: s, emit: i }) {
|
|
45
|
+
const d = g(), l = k(), a = p, f = i, { value: r, updateValue: m } = E(
|
|
46
|
+
a,
|
|
45
47
|
f
|
|
46
48
|
), c = C(() => {
|
|
47
49
|
const e = o(r);
|
|
48
|
-
return w(e) ?
|
|
50
|
+
return w(e) ? a.emptyText : z(e) ? `${e[0]}-${e[1]}` : e;
|
|
49
51
|
});
|
|
50
52
|
function v() {
|
|
51
53
|
var e, t;
|
|
52
|
-
(t = (e =
|
|
54
|
+
(t = (e = l.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
53
55
|
}
|
|
54
56
|
function y() {
|
|
55
57
|
var e, t;
|
|
56
|
-
(t = (e =
|
|
58
|
+
(t = (e = l.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
57
59
|
}
|
|
58
|
-
return
|
|
60
|
+
return s({
|
|
59
61
|
focus: v,
|
|
60
62
|
blur: y
|
|
61
63
|
}), (e, t) => e.mode === "read" ? (u(), S(_, { key: 0 }, [
|
|
62
64
|
P(T(c.value), 1)
|
|
63
65
|
], 64)) : (u(), V(o(N), b(
|
|
64
66
|
{ key: 1 },
|
|
65
|
-
o(D)(
|
|
67
|
+
o(D)(a, [
|
|
66
68
|
"value",
|
|
67
69
|
"onUpdate:value",
|
|
68
70
|
"mode",
|
|
@@ -73,7 +75,7 @@ const I = /* @__PURE__ */ x({
|
|
|
73
75
|
value: o(r),
|
|
74
76
|
"onUpdate:value": o(m),
|
|
75
77
|
ref_key: "sliderRef",
|
|
76
|
-
ref:
|
|
78
|
+
ref: l
|
|
77
79
|
}
|
|
78
80
|
), h({ _: 2 }, [
|
|
79
81
|
F(d, (L, n) => ({
|
|
@@ -9,6 +9,8 @@ const J = /* @__PURE__ */ F({
|
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
11
11
|
mode: {},
|
|
12
|
+
class: {},
|
|
13
|
+
style: {},
|
|
12
14
|
id: {},
|
|
13
15
|
prefixCls: {},
|
|
14
16
|
size: {
|
|
@@ -79,9 +81,9 @@ const J = /* @__PURE__ */ F({
|
|
|
79
81
|
await n.onAction(e) && a(e);
|
|
80
82
|
}
|
|
81
83
|
const $ = D(() => {
|
|
82
|
-
var
|
|
84
|
+
var d, t;
|
|
83
85
|
const e = o(l);
|
|
84
|
-
return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((
|
|
86
|
+
return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((d = c.checkedChildren) == null ? void 0 : d.call(c)) || `${n.checkedValue}`]) : u(s, null, [n.unCheckedChildren || ((t = c.unCheckedChildren) == null ? void 0 : t.call(c)) || `${n.unCheckedValue}`]);
|
|
85
87
|
});
|
|
86
88
|
return (e, r) => e.mode === "read" ? (h(), k(T($.value), {
|
|
87
89
|
key: 0
|
|
@@ -95,9 +97,9 @@ const J = /* @__PURE__ */ F({
|
|
|
95
97
|
loading: e.loading ?? i.value
|
|
96
98
|
}), g({
|
|
97
99
|
_: 2
|
|
98
|
-
}, [V(c, (
|
|
99
|
-
name:
|
|
100
|
-
fn: C((m) => [v(e.$slots,
|
|
100
|
+
}, [V(c, (d, t) => ({
|
|
101
|
+
name: t,
|
|
102
|
+
fn: C((m) => [v(e.$slots, t, B(w(m || {})))])
|
|
101
103
|
}))]), 1040, ["checked", "loading"])) : (h(), k(o(K), p({
|
|
102
104
|
key: 1
|
|
103
105
|
}, e.confirm || {}, {
|
|
@@ -109,9 +111,9 @@ const J = /* @__PURE__ */ F({
|
|
|
109
111
|
loading: e.loading ?? i.value
|
|
110
112
|
}), g({
|
|
111
113
|
_: 2
|
|
112
|
-
}, [V(c, (
|
|
113
|
-
name:
|
|
114
|
-
fn: C((m) => [v(e.$slots,
|
|
114
|
+
}, [V(c, (d, t) => ({
|
|
115
|
+
name: t,
|
|
116
|
+
fn: C((m) => [v(e.$slots, t, B(w(m || {})))])
|
|
115
117
|
}))]), 1040, ["checked", "loading"])]),
|
|
116
118
|
_: 3
|
|
117
119
|
}, 16))], 64));
|
|
@@ -34,7 +34,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
34
34
|
}>>> & {
|
|
35
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}, {
|
|
37
|
-
type: "number" | "text" | "color" | "
|
|
37
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
38
38
|
mode: FieldMode;
|
|
39
39
|
bordered: boolean;
|
|
40
40
|
allowClear: boolean;
|
|
@@ -3,8 +3,8 @@ import { Input as V } from "ant-design-vue";
|
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import { omit as j } from "lodash-unified";
|
|
5
5
|
import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
|
|
6
|
-
function T(
|
|
7
|
-
return typeof
|
|
6
|
+
function T(l) {
|
|
7
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !x(l);
|
|
8
8
|
}
|
|
9
9
|
const K = /* @__PURE__ */ v({
|
|
10
10
|
name: "ApFieldText",
|
|
@@ -13,6 +13,8 @@ const K = /* @__PURE__ */ v({
|
|
|
13
13
|
mode: {
|
|
14
14
|
default: "edit"
|
|
15
15
|
},
|
|
16
|
+
class: {},
|
|
17
|
+
style: {},
|
|
16
18
|
id: {},
|
|
17
19
|
placeholder: {},
|
|
18
20
|
autocomplete: {},
|
|
@@ -84,12 +86,12 @@ const K = /* @__PURE__ */ v({
|
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
88
|
emits: ["update:value"],
|
|
87
|
-
setup(
|
|
88
|
-
expose:
|
|
89
|
-
emit:
|
|
89
|
+
setup(l, {
|
|
90
|
+
expose: c,
|
|
91
|
+
emit: d
|
|
90
92
|
}) {
|
|
91
93
|
const n = B(), t = g();
|
|
92
|
-
|
|
94
|
+
c({
|
|
93
95
|
focus: (e) => {
|
|
94
96
|
var o;
|
|
95
97
|
(o = n.value) == null || o.focus(e);
|
|
@@ -111,19 +113,19 @@ const K = /* @__PURE__ */ v({
|
|
|
111
113
|
return (e = n.value) == null ? void 0 : e.input;
|
|
112
114
|
})
|
|
113
115
|
});
|
|
114
|
-
const f =
|
|
115
|
-
value:
|
|
116
|
+
const f = d, a = l, {
|
|
117
|
+
value: u,
|
|
116
118
|
updateValue: s
|
|
117
119
|
} = F(a, f);
|
|
118
120
|
function m() {
|
|
119
121
|
var e, o;
|
|
120
122
|
return a.mode === "edit" ? p(V, C(j(a, ["mode", "emptyText", "value", "onUpdate:value"]), {
|
|
121
|
-
value: i(
|
|
123
|
+
value: i(u),
|
|
122
124
|
"onUpdate:value": s,
|
|
123
125
|
ref: n
|
|
124
126
|
}), T(t) ? t : {
|
|
125
127
|
default: () => [t]
|
|
126
|
-
}) : p(h, null, [a.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), i(
|
|
128
|
+
}) : p(h, null, [a.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), i(u) || a.emptyText, a.suffix || ((o = t == null ? void 0 : t.suffix) == null ? void 0 : o.call(t))]);
|
|
127
129
|
}
|
|
128
130
|
return (e, o) => (S(), _(R(m())));
|
|
129
131
|
}
|
|
@@ -40,7 +40,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
40
40
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
41
41
|
}, {
|
|
42
42
|
visible: boolean;
|
|
43
|
-
type: "number" | "text" | "color" | "
|
|
43
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
44
44
|
mode: FieldMode;
|
|
45
45
|
bordered: boolean;
|
|
46
46
|
allowClear: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { isVNode as B, defineComponent as x, ref as C, useSlots as g, unref as p, createVNode as
|
|
1
|
+
import { isVNode as B, defineComponent as x, ref as C, useSlots as g, unref as p, createVNode as t, mergeProps as h, Fragment as V, openBlock as _, createBlock as w, resolveDynamicComponent as P } from "vue";
|
|
2
2
|
import { Input as S, Space as U } from "ant-design-vue";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import { omit as O } from "lodash-unified";
|
|
5
5
|
import { EyeOutlined as T, EyeInvisibleOutlined as j } from "@ant-design/icons-vue";
|
|
6
6
|
import { useControllableValue as d } from "../../hooks/useControllableValue.mjs";
|
|
7
|
-
function k(
|
|
8
|
-
return typeof
|
|
7
|
+
function k(o) {
|
|
8
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !B(o);
|
|
9
9
|
}
|
|
10
10
|
const D = /* @__PURE__ */ x({
|
|
11
11
|
name: "ApFieldTextPassword",
|
|
@@ -14,6 +14,8 @@ const D = /* @__PURE__ */ x({
|
|
|
14
14
|
mode: {
|
|
15
15
|
default: "edit"
|
|
16
16
|
},
|
|
17
|
+
class: {},
|
|
18
|
+
style: {},
|
|
17
19
|
id: {},
|
|
18
20
|
placeholder: {},
|
|
19
21
|
autocomplete: {},
|
|
@@ -98,7 +100,7 @@ const D = /* @__PURE__ */ x({
|
|
|
98
100
|
}
|
|
99
101
|
},
|
|
100
102
|
emits: ["update:value", "update:visible"],
|
|
101
|
-
setup(
|
|
103
|
+
setup(o, {
|
|
102
104
|
expose: c,
|
|
103
105
|
emit: f
|
|
104
106
|
}) {
|
|
@@ -113,35 +115,35 @@ const D = /* @__PURE__ */ x({
|
|
|
113
115
|
(e = a.value) == null || e.blur();
|
|
114
116
|
}
|
|
115
117
|
});
|
|
116
|
-
const i = f, l =
|
|
118
|
+
const i = f, l = o, {
|
|
117
119
|
value: m,
|
|
118
|
-
updateValue:
|
|
120
|
+
updateValue: y
|
|
119
121
|
} = d(l, i), {
|
|
120
|
-
value:
|
|
122
|
+
value: v,
|
|
121
123
|
updateValue: s
|
|
122
124
|
} = d(l, i, {
|
|
123
125
|
valuePropName: "visible"
|
|
124
126
|
});
|
|
125
127
|
function b() {
|
|
126
|
-
const e = p(m), n = p(
|
|
128
|
+
const e = p(m), n = p(v);
|
|
127
129
|
if (l.mode === "edit")
|
|
128
|
-
return
|
|
130
|
+
return t(S.Password, h(O(l, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
|
|
129
131
|
value: e,
|
|
130
|
-
"onUpdate:value":
|
|
132
|
+
"onUpdate:value": y,
|
|
131
133
|
visible: n,
|
|
132
134
|
"onUpdate:visible": s,
|
|
133
135
|
ref: a
|
|
134
136
|
}), k(u) ? u : {
|
|
135
137
|
default: () => [u]
|
|
136
138
|
});
|
|
137
|
-
let r =
|
|
138
|
-
return e && (r =
|
|
139
|
-
default: () => [
|
|
139
|
+
let r = t(V, null, [l.emptyText]);
|
|
140
|
+
return e && (r = t(U, null, {
|
|
141
|
+
default: () => [t("span", null, [n ? e : "********"]), t("span", {
|
|
140
142
|
style: {
|
|
141
143
|
cursor: "pointer"
|
|
142
144
|
},
|
|
143
145
|
onClick: () => s(!n)
|
|
144
|
-
}, [n ?
|
|
146
|
+
}, [n ? t(T, null, null) : t(j, null, null)])]
|
|
145
147
|
})), r;
|
|
146
148
|
}
|
|
147
149
|
return (e, n) => (_(), w(P(b())));
|
|
@@ -25,7 +25,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
25
25
|
}>>> & {
|
|
26
26
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
type: "number" | "text" | "color" | "
|
|
28
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
29
29
|
mode: FieldMode;
|
|
30
30
|
bordered: boolean;
|
|
31
31
|
allowClear: boolean;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as $, useSlots as j, ref as m, computed as b, unref as t, watch as q, cloneVNode as D, openBlock as h, createBlock as C, mergeProps as E, createSlots as K, withCtx as i, resolveDynamicComponent as O, createCommentVNode as Q, createElementVNode as U, normalizeClass as w, createVNode as g, normalizeStyle as G, renderList as H, renderSlot as J, normalizeProps as W, guardReactiveProps as X } from "vue";
|
|
2
|
+
import { Form as Y, Tooltip as Z } from "ant-design-vue";
|
|
3
|
+
import { useToken as M } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { isArray as ee, omit as k } from "lodash-unified";
|
|
5
|
+
import { apFormItemColPropKeys as oe } from "./constant.mjs";
|
|
6
|
+
import { QuestionCircleOutlined as te } from "@ant-design/icons-vue";
|
|
6
7
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useInjectForm as
|
|
8
|
+
import { useInjectForm as le } from "./context.mjs";
|
|
8
9
|
import "./style/ap-form-item.css";
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
10
|
+
import { useNamespace as re } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const ve = /* @__PURE__ */ $({
|
|
11
12
|
name: "ApFormItem",
|
|
12
13
|
__name: "ap-form-item",
|
|
13
14
|
props: {
|
|
@@ -48,10 +49,10 @@ const fe = /* @__PURE__ */ T({
|
|
|
48
49
|
bordered: { type: Boolean, default: !1 },
|
|
49
50
|
valuePropName: { default: "value" }
|
|
50
51
|
},
|
|
51
|
-
setup(
|
|
52
|
+
setup(N, { expose: P }) {
|
|
52
53
|
var y, F;
|
|
53
|
-
const o =
|
|
54
|
-
|
|
54
|
+
const o = N, l = j(), { model: u, updateModel: d } = le(), { m: f } = re("ap-form-item"), s = m(!1), r = m(), [, x] = M(), p = b(() => o.name ? ee(o.name) ? o.name.reduce((e, a) => e == null ? void 0 : e[a], t(u)) : u == null ? void 0 : u.value[o.name] : null), c = m((F = (y = l.default) == null ? void 0 : y.call(l)) == null ? void 0 : F[0]);
|
|
55
|
+
q(
|
|
55
56
|
() => {
|
|
56
57
|
var e;
|
|
57
58
|
return (e = l.default) == null ? void 0 : e.call(l);
|
|
@@ -60,13 +61,13 @@ const fe = /* @__PURE__ */ T({
|
|
|
60
61
|
c.value = e == null ? void 0 : e[0];
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
function
|
|
64
|
-
|
|
64
|
+
function V(e) {
|
|
65
|
+
d == null || d(o.name, e);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function I() {
|
|
67
68
|
s.value = !0;
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function S() {
|
|
70
71
|
s.value = !1;
|
|
71
72
|
}
|
|
72
73
|
const v = b(() => {
|
|
@@ -74,19 +75,19 @@ const fe = /* @__PURE__ */ T({
|
|
|
74
75
|
if (!o.name)
|
|
75
76
|
return (a = l.default()) == null ? void 0 : a[0];
|
|
76
77
|
const e = t(c);
|
|
77
|
-
return e ?
|
|
78
|
+
return e ? D(e, {
|
|
78
79
|
[o.valuePropName]: t(p),
|
|
79
|
-
[`onUpdate:${o.valuePropName}`]:
|
|
80
|
+
[`onUpdate:${o.valuePropName}`]: V,
|
|
80
81
|
bordered: o.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
|
|
81
|
-
onFocus:
|
|
82
|
-
onBlur:
|
|
82
|
+
onFocus: I,
|
|
83
|
+
onBlur: S
|
|
83
84
|
}) : null;
|
|
84
85
|
});
|
|
85
|
-
function
|
|
86
|
+
function _() {
|
|
86
87
|
var e;
|
|
87
88
|
(e = r.value) == null || e.onFieldBlur();
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function z() {
|
|
90
91
|
var e;
|
|
91
92
|
(e = r.value) == null || e.onFieldChange();
|
|
92
93
|
}
|
|
@@ -98,38 +99,40 @@ const fe = /* @__PURE__ */ T({
|
|
|
98
99
|
var e;
|
|
99
100
|
(e = r.value) == null || e.resetField();
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function T() {
|
|
102
103
|
return t(p);
|
|
103
104
|
}
|
|
104
|
-
return
|
|
105
|
-
onFieldBlur:
|
|
106
|
-
onFieldChange:
|
|
105
|
+
return P({
|
|
106
|
+
onFieldBlur: _,
|
|
107
|
+
onFieldChange: z,
|
|
107
108
|
clearValidate: A,
|
|
108
109
|
resetField: R,
|
|
109
|
-
getFieldValue:
|
|
110
|
-
}), (e, a) => (h(), C(t(
|
|
110
|
+
getFieldValue: T
|
|
111
|
+
}), (e, a) => (h(), C(t(Y).Item, E({
|
|
111
112
|
ref_key: "formItemRef",
|
|
112
113
|
ref: r
|
|
113
|
-
}, t(
|
|
114
|
-
class: { [t(
|
|
114
|
+
}, t(k)(o, [...t(oe), "tooltip"]), {
|
|
115
|
+
class: { [t(f)("bordered")]: e.bordered, [t(f)("focused")]: e.bordered && s.value },
|
|
115
116
|
colon: e.bordered ? !1 : o.colon
|
|
116
|
-
}),
|
|
117
|
-
default:
|
|
118
|
-
v.value ? (h(), C(
|
|
117
|
+
}), K({
|
|
118
|
+
default: i(() => [
|
|
119
|
+
v.value ? (h(), C(O(v.value), { key: 0 })) : Q("", !0)
|
|
119
120
|
]),
|
|
120
121
|
_: 2
|
|
121
122
|
}, [
|
|
122
123
|
o.tooltip ? {
|
|
123
124
|
name: "tooltip",
|
|
124
|
-
fn:
|
|
125
|
-
|
|
126
|
-
class:
|
|
125
|
+
fn: i(({ class: n }) => [
|
|
126
|
+
U("span", {
|
|
127
|
+
class: w(n)
|
|
127
128
|
}, [
|
|
128
|
-
g(t(
|
|
129
|
+
g(t(Z), {
|
|
129
130
|
title: o.tooltip
|
|
130
131
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
g(t(
|
|
132
|
+
default: i(() => [
|
|
133
|
+
g(t(te), {
|
|
134
|
+
style: G({ color: t(x).colorPrimary })
|
|
135
|
+
}, null, 8, ["style"])
|
|
133
136
|
]),
|
|
134
137
|
_: 1
|
|
135
138
|
}, 8, ["title"])
|
|
@@ -137,15 +140,15 @@ const fe = /* @__PURE__ */ T({
|
|
|
137
140
|
]),
|
|
138
141
|
key: "0"
|
|
139
142
|
} : void 0,
|
|
140
|
-
|
|
143
|
+
H(t(k)(l, "default"), (n, B) => ({
|
|
141
144
|
name: B,
|
|
142
|
-
fn:
|
|
143
|
-
|
|
145
|
+
fn: i((L) => [
|
|
146
|
+
J(e.$slots, B, W(X(L || {})))
|
|
144
147
|
])
|
|
145
148
|
}))
|
|
146
149
|
]), 1040, ["class", "colon"]));
|
|
147
150
|
}
|
|
148
151
|
});
|
|
149
152
|
export {
|
|
150
|
-
|
|
153
|
+
ve as default
|
|
151
154
|
};
|