@aplus-frontend/ui 0.2.0-beta.3 → 0.2.0-beta.5
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/hooks/use-default-placeholder.mjs +14 -14
- package/es/src/ap-form/item-text/style/css.d.ts +0 -1
- package/es/src/ap-form/item-text/style/css.js +1 -1
- package/es/src/ap-form/item-text/style/index.d.ts +0 -1
- package/es/src/ap-form/item-text/style/index.js +1 -1
- package/es/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/css.js +1 -0
- package/es/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/index.js +1 -0
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/date/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/interface.d.ts +11 -0
- package/es/src/ap-form/items/number/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/radio/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/select/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/es/src/ap-form/items/text/group.vue.mjs +4 -0
- package/es/src/ap-form/items/text/group.vue2.mjs +26 -0
- package/es/src/ap-form/items/text/index.d.ts +3 -1
- package/es/src/ap-form/items/text/index.mjs +10 -6
- package/es/src/ap-form/items/text/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/text/password.vue.d.ts +1 -1
- package/es/src/ap-form/items/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.mjs +103 -108
- package/es/src/ap-table/constants.d.ts +192 -190
- package/es/src/ap-table/utils.d.ts +197 -233
- package/es/src/ap-table/utils.mjs +69 -80
- package/es/src/ap-upload/apUpload.vue.d.ts +18 -2
- package/es/src/ap-upload/apUpload.vue.mjs +54 -42
- package/es/src/ap-upload/apUploadTypes.d.ts +24 -1
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +97 -91
- package/es/src/ap-upload/components/Picture.vue.d.ts +44 -1
- package/es/src/ap-upload/components/Picture.vue2.mjs +182 -153
- package/es/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +84 -86
- package/es/src/business/ap-label/constans.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -2
- package/es/src/editable-table/hooks/use-get-columns.mjs +29 -34
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/path-map.mjs +3 -1
- package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
- package/lib/src/ap-form/item-text/style/css.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/css.js +1 -1
- package/lib/src/ap-form/item-text/style/index.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/index.js +1 -1
- package/lib/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/css.js +1 -0
- package/lib/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/index.js +1 -0
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/interface.d.ts +11 -0
- package/lib/src/ap-form/items/number/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/lib/src/ap-form/items/text/group.vue.js +1 -0
- package/lib/src/ap-form/items/text/group.vue2.js +1 -0
- package/lib/src/ap-form/items/text/index.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +192 -190
- package/lib/src/ap-table/utils.d.ts +197 -233
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +18 -2
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +24 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +44 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -2
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +4 -4
|
@@ -1,70 +1,68 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as te, inject as s, ref as h, watch as ae, computed as ne, openBlock as _, createElementBlock as x, normalizeClass as oe, unref as a, createElementVNode as i, toDisplayString as A, createCommentVNode as z, normalizeStyle as le, createBlock as se, withModifiers as re, createVNode as ie } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getName as
|
|
4
|
-
import { useOss as
|
|
5
|
-
import { fileMatchesAccept as
|
|
6
|
-
import { message as u, Progress as
|
|
7
|
-
import { DeleteOutlined as
|
|
8
|
-
import
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
3
|
+
import { getName as ce, getReturnData as q } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as ue, useOssInit as pe } from "../hooks/useOss.mjs";
|
|
5
|
+
import { fileMatchesAccept as ve, getAcceptText as de } from "../utils/accept.mjs";
|
|
6
|
+
import { message as u, Progress as fe } from "ant-design-vue";
|
|
7
|
+
import { DeleteOutlined as me } from "@ant-design/icons-vue";
|
|
8
|
+
import M from "../assets/single-file-icon.png.mjs";
|
|
9
|
+
import { useLocale as ge } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const _e = ["accept"], ke = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "state-un"
|
|
14
|
-
},
|
|
14
|
+
}, ye = ["src"], De = { class: "state-un-title" }, Ce = { class: "state-un-subtitle" }, we = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "state-ing"
|
|
17
|
-
},
|
|
17
|
+
}, Fe = { class: "left" }, Ue = ["src"], Ne = { class: "center" }, Se = { class: "center-progress" }, Ie = /* @__PURE__ */ te({
|
|
18
18
|
__name: "SingleFile",
|
|
19
|
-
setup(
|
|
20
|
-
const { t: r } =
|
|
21
|
-
|
|
22
|
-
() =>
|
|
19
|
+
setup(Ee, { expose: j }) {
|
|
20
|
+
const { t: r } = ge(), { b: k } = he("ap-upload-single-file"), { put: G, client: B } = ue(), y = s("theme"), W = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), O = s("customRequest"), J = s("getOssAccess"), o = h(null);
|
|
21
|
+
ae(
|
|
22
|
+
() => n == null ? void 0 : n.value,
|
|
23
23
|
function(e) {
|
|
24
|
-
|
|
25
|
-
if (n.value === null && e) {
|
|
26
|
-
const t = re(F, e);
|
|
27
|
-
o.value = 3, n.value = new File(
|
|
28
|
-
[e],
|
|
29
|
-
t,
|
|
30
|
-
{}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
24
|
+
o.value === null && e && P(e);
|
|
34
25
|
},
|
|
35
26
|
{ immediate: !0 }
|
|
36
27
|
);
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
function P(e) {
|
|
29
|
+
e ? setTimeout(() => {
|
|
30
|
+
const t = ce(F, e);
|
|
31
|
+
l.value = 3, o.value = new File([e], t, {}), n.value = e;
|
|
32
|
+
}) : (l.value = 1, o.value = null, n.value = void 0);
|
|
33
|
+
}
|
|
34
|
+
j({ setValue: P });
|
|
35
|
+
const l = h(1), f = h(0), m = h(null), T = ne(() => o.value && (n == null ? void 0 : n.value));
|
|
36
|
+
function K() {
|
|
39
37
|
var e;
|
|
40
|
-
|
|
38
|
+
l.value === 1 && ((e = m.value) == null || e.click());
|
|
41
39
|
}
|
|
42
|
-
function
|
|
40
|
+
function L(e) {
|
|
43
41
|
e.preventDefault(), e.stopPropagation();
|
|
44
42
|
}
|
|
45
|
-
function
|
|
43
|
+
function Q(e) {
|
|
46
44
|
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
47
45
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
46
|
+
function X(e) {
|
|
47
|
+
R(e);
|
|
50
48
|
}
|
|
51
|
-
function
|
|
52
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
49
|
+
function Y(e) {
|
|
50
|
+
if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
|
|
53
51
|
return;
|
|
54
|
-
var t = e.dataTransfer, c = [],
|
|
52
|
+
var t = e.dataTransfer, c = [], I = 0, $ = t.files.length;
|
|
55
53
|
function v() {
|
|
56
|
-
|
|
54
|
+
I === $ - 1 && X(c), I++;
|
|
57
55
|
}
|
|
58
56
|
if (t.items !== void 0)
|
|
59
57
|
for (var U = 0; U < t.items.length; U++) {
|
|
60
58
|
var N = t.items[U];
|
|
61
59
|
if (N.kind === "file" && N.webkitGetAsEntry().isFile) {
|
|
62
|
-
var
|
|
63
|
-
c.push(
|
|
60
|
+
var ee = N.getAsFile();
|
|
61
|
+
c.push(ee), v();
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
else
|
|
67
|
-
for (let E = 0; E <
|
|
65
|
+
for (let E = 0; E < $; E++) {
|
|
68
66
|
var g = t.files[E];
|
|
69
67
|
if (g.type)
|
|
70
68
|
c.push(g), v();
|
|
@@ -89,11 +87,11 @@ const ge = ["accept"], he = {
|
|
|
89
87
|
}
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
function
|
|
90
|
+
function Z(e) {
|
|
93
91
|
const t = e.target;
|
|
94
|
-
|
|
92
|
+
R(t == null ? void 0 : t.files), m.value && (m.value.value = "");
|
|
95
93
|
}
|
|
96
|
-
async function
|
|
94
|
+
async function R(e) {
|
|
97
95
|
if (e != null && e.length) {
|
|
98
96
|
if (typeof b == "function") {
|
|
99
97
|
if (b(e[0]) === !1)
|
|
@@ -107,44 +105,44 @@ const ge = ["accept"], he = {
|
|
|
107
105
|
);
|
|
108
106
|
return;
|
|
109
107
|
}
|
|
110
|
-
if (!
|
|
108
|
+
if (!ve(e[0], D)) {
|
|
111
109
|
u.warning(r("ap.apUpload.fileFormatNotSupported"));
|
|
112
110
|
return;
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
|
-
if (
|
|
113
|
+
if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof O == "function") {
|
|
116
114
|
O({
|
|
117
115
|
onProgress: (t) => {
|
|
118
116
|
f.value = t;
|
|
119
117
|
},
|
|
120
118
|
onError: (t) => {
|
|
121
|
-
u.warning(t || r("ap.apUpload.networkAnomaly")),
|
|
119
|
+
u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
|
|
122
120
|
},
|
|
123
121
|
onSuccess: (t) => {
|
|
124
|
-
|
|
122
|
+
n.value = q(
|
|
125
123
|
F,
|
|
126
124
|
t,
|
|
127
|
-
|
|
128
|
-
),
|
|
125
|
+
o.value.name
|
|
126
|
+
), l.value = 3, p.value--;
|
|
129
127
|
},
|
|
130
128
|
file: e[0]
|
|
131
129
|
});
|
|
132
130
|
return;
|
|
133
131
|
}
|
|
134
132
|
try {
|
|
135
|
-
await
|
|
136
|
-
file:
|
|
137
|
-
dirName:
|
|
133
|
+
await pe(J), G({
|
|
134
|
+
file: o.value,
|
|
135
|
+
dirName: W,
|
|
138
136
|
oss: B,
|
|
139
137
|
successCallBack(t) {
|
|
140
|
-
|
|
138
|
+
n.value = q(
|
|
141
139
|
F,
|
|
142
140
|
t,
|
|
143
|
-
|
|
144
|
-
),
|
|
141
|
+
o.value.name
|
|
142
|
+
), l.value = 3, p.value--;
|
|
145
143
|
},
|
|
146
144
|
errorCallBack(t) {
|
|
147
|
-
u.warning(t || r("ap.apUpload.networkAnomaly")),
|
|
145
|
+
u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
|
|
148
146
|
},
|
|
149
147
|
progressCallBack(t) {
|
|
150
148
|
f.value = t;
|
|
@@ -153,26 +151,26 @@ const ge = ["accept"], he = {
|
|
|
153
151
|
} catch (t) {
|
|
154
152
|
u.warning(
|
|
155
153
|
typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
|
|
156
|
-
),
|
|
154
|
+
), l.value = 1, o.value = null, p.value--;
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
|
-
function
|
|
161
|
-
|
|
158
|
+
function V() {
|
|
159
|
+
o.value && !(n != null && n.value) && B.pauseUpload(), l.value = 1, o.value = null, n.value = void 0;
|
|
162
160
|
}
|
|
163
161
|
return (e, t) => {
|
|
164
162
|
var c;
|
|
165
|
-
return _(),
|
|
166
|
-
class:
|
|
163
|
+
return _(), x("div", {
|
|
164
|
+
class: oe({
|
|
167
165
|
[a(k)()]: !0,
|
|
168
166
|
[a(k)("admin")]: a(y) === "admin",
|
|
169
|
-
[a(k)("un")]:
|
|
167
|
+
[a(k)("un")]: l.value === 1
|
|
170
168
|
}),
|
|
171
|
-
onClick:
|
|
172
|
-
onDragenter:
|
|
173
|
-
onDragover:
|
|
174
|
-
onDragleave:
|
|
175
|
-
onDrop:
|
|
169
|
+
onClick: K,
|
|
170
|
+
onDragenter: L,
|
|
171
|
+
onDragover: Q,
|
|
172
|
+
onDragleave: L,
|
|
173
|
+
onDrop: Y
|
|
176
174
|
}, [
|
|
177
175
|
i("input", {
|
|
178
176
|
style: { display: "none" },
|
|
@@ -180,33 +178,33 @@ const ge = ["accept"], he = {
|
|
|
180
178
|
ref_key: "fileRef",
|
|
181
179
|
ref: m,
|
|
182
180
|
accept: a(D),
|
|
183
|
-
onChange:
|
|
184
|
-
}, null, 40,
|
|
185
|
-
|
|
181
|
+
onChange: Z
|
|
182
|
+
}, null, 40, _e),
|
|
183
|
+
l.value === 1 ? (_(), x("div", ke, [
|
|
186
184
|
i("img", {
|
|
187
185
|
class: "state-un-icon",
|
|
188
|
-
src: a(
|
|
189
|
-
}, null, 8,
|
|
190
|
-
i("div",
|
|
191
|
-
i("div",
|
|
186
|
+
src: a(M)
|
|
187
|
+
}, null, 8, ye),
|
|
188
|
+
i("div", De, A(a(H)), 1),
|
|
189
|
+
i("div", Ce, A(typeof a(w) == "string" && a(w).length > 0 ? a(w) : `${a(r)("ap.apUpload.supportExtension")}:${a(de)(
|
|
192
190
|
a(D)
|
|
193
191
|
)},${a(r)("ap.apUpload.maxWarnUploadFileSize", {
|
|
194
192
|
maxSize: a(C)
|
|
195
193
|
})}`), 1)
|
|
196
194
|
])) : z("", !0),
|
|
197
|
-
[2, 3].includes(
|
|
198
|
-
i("div", Ce, [
|
|
199
|
-
i("img", { src: a(q) }, null, 8, we)
|
|
200
|
-
]),
|
|
195
|
+
[2, 3].includes(l.value) ? (_(), x("div", we, [
|
|
201
196
|
i("div", Fe, [
|
|
197
|
+
i("img", { src: a(M) }, null, 8, Ue)
|
|
198
|
+
]),
|
|
199
|
+
i("div", Ne, [
|
|
202
200
|
i("div", {
|
|
203
201
|
class: "center-title",
|
|
204
|
-
style:
|
|
205
|
-
color:
|
|
202
|
+
style: le({
|
|
203
|
+
color: T.value ? "#0070FF" : "#182948"
|
|
206
204
|
})
|
|
207
|
-
},
|
|
208
|
-
i("div",
|
|
209
|
-
|
|
205
|
+
}, A((c = o.value) == null ? void 0 : c.name), 5),
|
|
206
|
+
i("div", Se, [
|
|
207
|
+
T.value ? z("", !0) : (_(), se(a(fe), {
|
|
210
208
|
key: 0,
|
|
211
209
|
percent: f.value,
|
|
212
210
|
size: 4,
|
|
@@ -218,9 +216,9 @@ const ge = ["accept"], he = {
|
|
|
218
216
|
]),
|
|
219
217
|
i("div", {
|
|
220
218
|
class: "right",
|
|
221
|
-
onClick:
|
|
219
|
+
onClick: re(V, ["stop"])
|
|
222
220
|
}, [
|
|
223
|
-
|
|
221
|
+
ie(a(me))
|
|
224
222
|
])
|
|
225
223
|
])) : z("", !0)
|
|
226
224
|
], 34);
|
|
@@ -228,5 +226,5 @@ const ge = ["accept"], he = {
|
|
|
228
226
|
}
|
|
229
227
|
});
|
|
230
228
|
export {
|
|
231
|
-
|
|
229
|
+
Ie as default
|
|
232
230
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType, VNode, CSSProperties } from 'vue';
|
|
2
2
|
import { ApLabelGroupItemProps } from './interface';
|
|
3
|
-
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip/Tooltip';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
5
|
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
6
6
|
export declare const ApLabelGroupProps: () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BadgeProps } from 'ant-design-vue';
|
|
2
|
-
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
|
-
import { TagProps } from 'ant-design-vue/es/
|
|
2
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip/Tooltip';
|
|
3
|
+
import { TagProps } from 'ant-design-vue/es/tag';
|
|
4
4
|
import { VNode, VNodeChild } from 'vue';
|
|
5
5
|
type Recordable = Record<string, any>;
|
|
6
6
|
export type ApLabelProps = BadgeProps & Partial<{
|
|
@@ -1,50 +1,45 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { omit as
|
|
1
|
+
import { useSlots as N, computed as T, unref as m } from "vue";
|
|
2
|
+
import { omit as y, isFunction as k, isArray as f } from "lodash-unified";
|
|
3
3
|
import { getEditableTableTitle as w, mergeClass as A, getFinalNode as q } from "../utils.mjs";
|
|
4
|
-
import { updateFormProps as
|
|
4
|
+
import { updateFormProps as v, getFieldProps as E, getTableRenderProps as G } from "../../ap-table/utils.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { useToken as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const W = (a, b) => {
|
|
6
|
+
import { useToken as S } from "ant-design-vue/es/theme/internal";
|
|
7
|
+
import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const M = (a, b) => {
|
|
10
9
|
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = j("editable-table"), F = y(), [, I] = U();
|
|
16
|
-
return N(() => {
|
|
10
|
+
em: x,
|
|
11
|
+
be: g
|
|
12
|
+
} = U("editable-table"), F = N(), [, h] = S();
|
|
13
|
+
return T(() => {
|
|
17
14
|
const d = a.columns;
|
|
18
15
|
if (!d)
|
|
19
16
|
return [];
|
|
20
|
-
function c(
|
|
21
|
-
return
|
|
22
|
-
...
|
|
17
|
+
function c(I) {
|
|
18
|
+
return I.map((e) => ({
|
|
19
|
+
...y(e, ["ellipsis"]),
|
|
23
20
|
children: c(e.children || []),
|
|
24
|
-
title: w(e,
|
|
21
|
+
title: w(e, g("table-header", "title"), x("header-cell", "required"), F.headerCell, m(h).colorPrimary),
|
|
25
22
|
customRender({
|
|
26
|
-
value:
|
|
23
|
+
value: t,
|
|
27
24
|
...n
|
|
28
25
|
}) {
|
|
29
|
-
const
|
|
26
|
+
const o = k(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
|
|
30
27
|
if (!e.valueType && !e.customRender && !e.customRenderFormItem)
|
|
31
28
|
return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"), null;
|
|
32
29
|
let r;
|
|
33
|
-
if (
|
|
34
|
-
const l =
|
|
35
|
-
value:
|
|
30
|
+
if (o) {
|
|
31
|
+
const l = v(e, E(e.fieldProps, {
|
|
32
|
+
value: t,
|
|
36
33
|
...n
|
|
37
34
|
})), i = {};
|
|
38
|
-
a.onFieldChange && (i[`onUpdate:${l.valuePropName || "value"}`] = (
|
|
35
|
+
a.onFieldChange && (i[`onUpdate:${l.valuePropName || "value"}`] = (C) => {
|
|
39
36
|
var s;
|
|
40
|
-
return (s = a.onFieldChange) == null ? void 0 : s.call(a, n.index, e.dataIndex,
|
|
37
|
+
return (s = a.onFieldChange) == null ? void 0 : s.call(a, n.index, e.dataIndex, C);
|
|
41
38
|
});
|
|
42
|
-
const
|
|
39
|
+
const R = f(e.dataIndex) ? e.dataIndex : [e.dataIndex];
|
|
43
40
|
r = {
|
|
44
|
-
name: [...f(a.name) ? a.name : [a.name], n.index, ...
|
|
41
|
+
name: [...f(a.name) ? a.name : [a.name], n.index, ...R],
|
|
45
42
|
...l || {},
|
|
46
|
-
// 格式化placeholder
|
|
47
|
-
placeholder: L(g, e.valueType, l == null ? void 0 : l.placeholder),
|
|
48
43
|
field: {
|
|
49
44
|
style: "width: 100%",
|
|
50
45
|
...(l == null ? void 0 : l.field) || {},
|
|
@@ -54,16 +49,16 @@ const W = (a, b) => {
|
|
|
54
49
|
};
|
|
55
50
|
} else
|
|
56
51
|
r = {
|
|
57
|
-
field:
|
|
58
|
-
value:
|
|
52
|
+
field: G(e, {
|
|
53
|
+
value: t,
|
|
59
54
|
...n
|
|
60
55
|
})
|
|
61
56
|
};
|
|
62
|
-
const u = q(e,
|
|
57
|
+
const u = q(e, o, r, t, n.record, m(b));
|
|
63
58
|
return e.customRender ? e.customRender({
|
|
64
|
-
value:
|
|
59
|
+
value: t,
|
|
65
60
|
...n,
|
|
66
|
-
editable:
|
|
61
|
+
editable: o,
|
|
67
62
|
originalNode: u
|
|
68
63
|
}) : u;
|
|
69
64
|
}
|
|
@@ -73,5 +68,5 @@ const W = (a, b) => {
|
|
|
73
68
|
});
|
|
74
69
|
};
|
|
75
70
|
export {
|
|
76
|
-
|
|
71
|
+
M as default
|
|
77
72
|
};
|
package/es/src/path-map.mjs
CHANGED
|
@@ -41,6 +41,7 @@ const e = {
|
|
|
41
41
|
ApFormItemSwitch: ["ap-form", "item-switch"],
|
|
42
42
|
ApFormItemCheckbox: ["ap-form", "item-checkbox"],
|
|
43
43
|
ApFormItemTextPassword: ["ap-form", "item-text-password"],
|
|
44
|
+
ApFormItemTextGroup: ["ap-form", "item-text-group"],
|
|
44
45
|
ApInfoLayout: ["ap-info-layout"],
|
|
45
46
|
ApList: ["ap-list"],
|
|
46
47
|
ApModal: ["ap-modal"],
|
|
@@ -70,7 +71,8 @@ const e = {
|
|
|
70
71
|
ApStatus: ["business", "ap-status"],
|
|
71
72
|
ApStatusGroup: ["business", "ap-status", "group"],
|
|
72
73
|
ApTableModal: ["business", "ap-table-modal"],
|
|
73
|
-
ApTitle: ["business", "ap-title"]
|
|
74
|
+
ApTitle: ["business", "ap-title"],
|
|
75
|
+
ApSummary: ["business", "ap-summary"]
|
|
74
76
|
};
|
|
75
77
|
export {
|
|
76
78
|
e as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");require("../../config-provider/index.js");const u=require("../../utils/index.js"),n=require("../../config-provider/hooks/use-locale.js"),c=["Select","Date"],s=["Text","TextArea","Number","TextPassword"],i=(t,r)=>{const{t:e}=n.useLocale();return o.computed(()=>{if(u.isDef(r.placeholder))return r.placeholder;if(t==="DateRange")return[e("ap.field.startDateText"),e("ap.field.endDateText")];if(c.includes(t))return e("ap.common.chooseText");if(s.includes(t))return e("ap.common.inputText")})};exports.useDefaultPlaceholder=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@aplus-frontend/ui-theme/dist/ap-form/item-text.css';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@aplus-frontend/ui-theme/src/ap-form/item-text.less';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/dist/ap-form/item-text-group.css';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/src/ap-form/item-text-group.less';
|
|
@@ -27,12 +27,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
27
27
|
field: () => {};
|
|
28
28
|
}>>>, {
|
|
29
29
|
disabled: boolean;
|
|
30
|
+
field: Omit< ApFieldCheckboxProps, "value" | "onUpdate:value">;
|
|
30
31
|
colon: boolean;
|
|
31
32
|
required: boolean;
|
|
32
33
|
hasFeedback: boolean;
|
|
33
34
|
autoLink: boolean;
|
|
34
35
|
validateFirst: boolean;
|
|
35
|
-
field: Omit< ApFieldCheckboxProps, "value" | "onUpdate:value">;
|
|
36
36
|
}, {}>;
|
|
37
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
38
|
export default _default;
|
|
@@ -50,12 +50,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
50
50
|
field: () => {};
|
|
51
51
|
}>>>, {
|
|
52
52
|
disabled: boolean;
|
|
53
|
+
field: Omit< ApFieldDateProps, "value" | "onUpdate:value">;
|
|
53
54
|
colon: boolean;
|
|
54
55
|
required: boolean;
|
|
55
56
|
hasFeedback: boolean;
|
|
56
57
|
autoLink: boolean;
|
|
57
58
|
validateFirst: boolean;
|
|
58
|
-
field: Omit< ApFieldDateProps, "value" | "onUpdate:value">;
|
|
59
59
|
}, {}>;
|
|
60
60
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
61
61
|
export default _default;
|
|
@@ -48,12 +48,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
48
48
|
field: () => {};
|
|
49
49
|
}>>>, {
|
|
50
50
|
disabled: boolean;
|
|
51
|
+
field: Omit< ApFieldDateRangeProps, "value" | "onUpdate:value">;
|
|
51
52
|
colon: boolean;
|
|
52
53
|
required: boolean;
|
|
53
54
|
hasFeedback: boolean;
|
|
54
55
|
autoLink: boolean;
|
|
55
56
|
validateFirst: boolean;
|
|
56
|
-
field: Omit< ApFieldDateRangeProps, "value" | "onUpdate:value">;
|
|
57
57
|
}, {}>;
|
|
58
58
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
59
59
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from 'ant-design-vue/es/config-provider';
|
|
1
2
|
import { ApFieldCheckboxProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldNumberProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTextAreaProps, ApFieldTextPasswordProps, ApFieldTextProps } from '../../ap-field';
|
|
2
3
|
import { ApFormItemProps } from '../interface';
|
|
3
4
|
export type ApFormItemTextProps = ApFormItemProps & {
|
|
@@ -47,3 +48,13 @@ export type ApFormItemCheckboxProps = Omit<ApFormItemProps, 'bordered'> & {
|
|
|
47
48
|
field?: Omit<ApFieldCheckboxProps, 'value' | 'onUpdate:value'>;
|
|
48
49
|
disabled?: boolean;
|
|
49
50
|
};
|
|
51
|
+
export type ApFormItemTextGroupProps = {
|
|
52
|
+
/**
|
|
53
|
+
* ApFormItem 控件所有支持的
|
|
54
|
+
*/
|
|
55
|
+
size?: SizeType;
|
|
56
|
+
/**
|
|
57
|
+
* 是否启用紧凑模式
|
|
58
|
+
*/
|
|
59
|
+
compact?: boolean;
|
|
60
|
+
};
|
|
@@ -594,12 +594,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
594
594
|
field: () => {};
|
|
595
595
|
}>>>, {
|
|
596
596
|
disabled: boolean;
|
|
597
|
+
field: Omit< ApFieldNumberProps, "value" | "onUpdate:value">;
|
|
597
598
|
colon: boolean;
|
|
598
599
|
required: boolean;
|
|
599
600
|
hasFeedback: boolean;
|
|
600
601
|
autoLink: boolean;
|
|
601
602
|
validateFirst: boolean;
|
|
602
|
-
field: Omit< ApFieldNumberProps, "value" | "onUpdate:value">;
|
|
603
603
|
}, {}>;
|
|
604
604
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
605
605
|
export default _default;
|
|
@@ -229,12 +229,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
229
229
|
field: () => {};
|
|
230
230
|
}>>>, {
|
|
231
231
|
disabled: boolean;
|
|
232
|
+
field: Omit< ApFieldRadioProps, "value" | "onUpdate:value">;
|
|
232
233
|
colon: boolean;
|
|
233
234
|
required: boolean;
|
|
234
235
|
hasFeedback: boolean;
|
|
235
236
|
autoLink: boolean;
|
|
236
237
|
validateFirst: boolean;
|
|
237
|
-
field: Omit< ApFieldRadioProps, "value" | "onUpdate:value">;
|
|
238
238
|
}, {}>;
|
|
239
239
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
240
240
|
export default _default;
|
|
@@ -55,12 +55,12 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
55
55
|
field: () => {};
|
|
56
56
|
}>>>, {
|
|
57
57
|
disabled: boolean;
|
|
58
|
+
field: Omit< ApFieldSelectProps, "value" | "onUpdate:value">;
|
|
58
59
|
colon: boolean;
|
|
59
60
|
required: boolean;
|
|
60
61
|
hasFeedback: boolean;
|
|
61
62
|
autoLink: boolean;
|
|
62
63
|
validateFirst: boolean;
|
|
63
|
-
field: Omit< ApFieldSelectProps, "value" | "onUpdate:value">;
|
|
64
64
|
}, {}>;
|
|
65
65
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
66
66
|
export default _default;
|
|
@@ -36,13 +36,13 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
36
36
|
field: () => {};
|
|
37
37
|
}>>>, {
|
|
38
38
|
disabled: boolean;
|
|
39
|
+
field: Omit< ApFieldSwitchProps, "checked" | "onUpdate:checked">;
|
|
39
40
|
colon: boolean;
|
|
40
41
|
required: boolean;
|
|
41
42
|
hasFeedback: boolean;
|
|
42
43
|
autoLink: boolean;
|
|
43
44
|
validateFirst: boolean;
|
|
44
45
|
valuePropName: string;
|
|
45
|
-
field: Omit< ApFieldSwitchProps, "checked" | "onUpdate:checked">;
|
|
46
46
|
}, {}>;
|
|
47
47
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
48
|
export default _default;
|