@aplus-frontend/ui 0.2.22 → 0.2.24
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-drawer/interface.d.ts +1 -1
- package/es/src/ap-drawer/utils/createDrawer.mjs +31 -32
- package/es/src/ap-field/checkbox/index.vue.d.ts +3 -0
- package/es/src/ap-field/checkbox/index.vue.mjs +6 -6
- package/es/src/ap-field/number/index.vue.d.ts +3 -0
- package/es/src/ap-field/number/index.vue.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.d.ts +3 -0
- package/es/src/ap-field/radio/index.vue.mjs +8 -8
- package/es/src/ap-field/rate/index.vue.d.ts +2 -2
- package/es/src/ap-field/rate/index.vue.mjs +3 -3
- package/es/src/ap-field/slider/index.vue.d.ts +3 -0
- package/es/src/ap-field/slider/index.vue.mjs +4 -4
- package/es/src/ap-field/switch/index.vue.d.ts +3 -0
- package/es/src/ap-field/switch/index.vue.mjs +2 -1
- package/es/src/ap-field/text/index.vue.d.ts +3 -0
- package/es/src/ap-field/text/index.vue2.mjs +9 -8
- package/es/src/ap-field/text/password.vue.d.ts +3 -0
- package/es/src/ap-field/text/password.vue.mjs +8 -7
- package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
- package/es/src/ap-field/text-area/index.vue.mjs +5 -5
- package/es/src/ap-form/hooks/use-watch.d.ts +1 -1
- package/es/src/ap-form/hooks/use-watch.mjs +28 -22
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/checkbox/index.vue.mjs +12 -12
- package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/date/index.vue.mjs +10 -10
- package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/date-range/index.vue.mjs +9 -9
- package/es/src/ap-form/items/number/index.vue.d.ts +8 -3
- package/es/src/ap-form/items/number/index.vue.mjs +10 -10
- package/es/src/ap-form/items/radio/index.vue.d.ts +7 -2
- package/es/src/ap-form/items/radio/index.vue.mjs +6 -6
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.mjs +10 -10
- package/es/src/ap-form/items/switch/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -10
- package/es/src/ap-form/items/text/index.vue.d.ts +8 -3
- package/es/src/ap-form/items/text/index.vue2.mjs +15 -15
- package/es/src/ap-form/items/text/password.vue.d.ts +8 -3
- package/es/src/ap-form/items/text/password.vue.mjs +10 -10
- package/es/src/ap-form/items/text-area/index.vue.d.ts +7 -2
- package/es/src/ap-form/items/text-area/index.vue.mjs +11 -11
- package/es/src/ap-modal/interface.d.ts +1 -0
- package/es/src/ap-modal/utils/createModal.mjs +41 -35
- package/es/src/ap-table/ap-table.vue2.mjs +31 -34
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +21 -21
- package/es/src/ap-table/constants.d.ts +77 -40
- package/es/src/ap-table/utils.d.ts +40 -40
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -0
- package/es/src/ap-upload/apUpload.vue.mjs +7 -6
- package/es/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +30 -30
- package/es/src/ap-upload/components/Picture.vue2.mjs +33 -33
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +40 -40
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +1 -1
- package/es/src/design-token/index.mjs +3 -1
- package/es/src/theme/antd-global-overwrite/admin/form.css +0 -3
- package/es/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/es/src/theme/antd-global-overwrite/aplus/form.css +0 -4
- package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -4
- package/lib/src/ap-drawer/interface.d.ts +1 -1
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +3 -0
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +3 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.d.ts +3 -0
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +2 -2
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +3 -0
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +3 -0
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +3 -0
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +3 -0
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-watch.d.ts +1 -1
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +8 -3
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +7 -2
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +8 -3
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +8 -3
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +7 -2
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +1 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +77 -40
- package/lib/src/ap-table/utils.d.ts +40 -40
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -0
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/form.css +0 -3
- package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/lib/src/theme/antd-global-overwrite/aplus/form.css +0 -4
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -4
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as X, inject as c, ref as
|
|
1
|
+
import { defineComponent as X, inject as c, ref as R, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as C, createCommentVNode as I, vShow as se, toDisplayString as U } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getPath as oe, getName as ie, getReturnData as
|
|
3
|
+
import { getPath as oe, getName as ie, getReturnData as M } from "../utils/returnData.mjs";
|
|
4
4
|
import { CloseOutlined as re, PlusOutlined as ce } from "@ant-design/icons-vue";
|
|
5
5
|
import { useOss as ue, getOssInstance as $ } from "../hooks/useOss.mjs";
|
|
6
6
|
import { fileMatchesAccept as le, getAcceptText as pe } from "../utils/accept.mjs";
|
|
@@ -8,24 +8,24 @@ import { message as m, Progress as de } from "@aplus-frontend/antdv";
|
|
|
8
8
|
import { omit as me } from "lodash-unified";
|
|
9
9
|
import { useLocale as fe } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as ge } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture-item-box" },
|
|
11
|
+
const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture-item-box" }, ye = ["src"], _e = { class: "picture-item-shadow" }, we = ["onClick"], Ce = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "picture-item-uploading"
|
|
14
|
-
},
|
|
14
|
+
}, Ue = { class: "picture-title" }, ke = { key: 0 }, Se = { key: 1 }, De = /* @__PURE__ */ X({
|
|
15
15
|
__name: "Picture",
|
|
16
16
|
setup(Ee, { expose: T }) {
|
|
17
|
-
const { t: u } = fe(), { b:
|
|
18
|
-
let s =
|
|
17
|
+
const { t: u } = fe(), { b: k } = ge("ap-upload-picture"), { put: D } = ue(), O = c("theme"), B = c("dirName"), _ = c("accept") || "image/*", w = c("maxSize") ?? 5, S = c("title"), l = c("maxCount") ?? 10, v = c("uploadingCount"), E = c("beforeUpload"), b = c("customRequest"), z = c("getOssAccess"), L = c("maxSizeErrorMsg"), q = c("maxCountErrorMsg"), V = c("acceptErrorMsg"), x = R(null), r = c("value"), y = c("needName");
|
|
18
|
+
let s = R([]);
|
|
19
19
|
const f = [];
|
|
20
20
|
Y(
|
|
21
21
|
() => r == null ? void 0 : r.value,
|
|
22
22
|
async function(e) {
|
|
23
23
|
var a;
|
|
24
|
-
!((a = s == null ? void 0 : s.value) != null && a.length) && e &&
|
|
24
|
+
!((a = s == null ? void 0 : s.value) != null && a.length) && e && A(e);
|
|
25
25
|
},
|
|
26
26
|
{ immediate: !0 }
|
|
27
27
|
);
|
|
28
|
-
function
|
|
28
|
+
function A(e) {
|
|
29
29
|
if (!e) {
|
|
30
30
|
r.value = void 0, f.splice(0, f.length), s.value = [];
|
|
31
31
|
return;
|
|
@@ -33,7 +33,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
33
33
|
Z(async () => {
|
|
34
34
|
const a = [];
|
|
35
35
|
for (let t of e) {
|
|
36
|
-
const n = oe(
|
|
36
|
+
const n = oe(y, t), o = ie(y, t), p = await $(z), Q = await p.getSignatureUrl(n), W = {
|
|
37
37
|
...typeof t == "string" ? {} : t,
|
|
38
38
|
...new File([t], o, {}),
|
|
39
39
|
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
@@ -60,7 +60,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
60
60
|
}), r.value = e;
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
T({ setValue:
|
|
63
|
+
T({ setValue: A });
|
|
64
64
|
function j() {
|
|
65
65
|
var e;
|
|
66
66
|
(e = x.value) == null || e.click();
|
|
@@ -75,23 +75,23 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
75
75
|
J(e[a]);
|
|
76
76
|
x.value && (x.value.value = "");
|
|
77
77
|
}
|
|
78
|
-
let
|
|
79
|
-
function J(e) {
|
|
78
|
+
let N;
|
|
79
|
+
async function J(e) {
|
|
80
80
|
if (l && l > 1 && s.value.length >= l)
|
|
81
|
-
return clearTimeout(
|
|
81
|
+
return clearTimeout(N), N = setTimeout(() => {
|
|
82
82
|
m.warning(
|
|
83
83
|
q || u("ap.apUpload.maxUploadPicture", { maxCount: l })
|
|
84
84
|
);
|
|
85
85
|
}), !1;
|
|
86
86
|
if (typeof E == "function") {
|
|
87
|
-
if (E(e) === !1)
|
|
87
|
+
if (await E(e) === !1)
|
|
88
88
|
return !1;
|
|
89
89
|
} else {
|
|
90
90
|
if (e.size > w * 1024 * 1024)
|
|
91
91
|
return m.warning(
|
|
92
92
|
L || u("ap.apUpload.maxUploadFileSize", { maxSize: w })
|
|
93
93
|
), !1;
|
|
94
|
-
if (!/image\/\w+/.test(e.type) || !le(e,
|
|
94
|
+
if (!/image\/\w+/.test(e.type) || !le(e, _))
|
|
95
95
|
return m.warning(
|
|
96
96
|
V || u("ap.apUpload.pictureFormatNotSupported")
|
|
97
97
|
), !1;
|
|
@@ -111,8 +111,8 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
async function K(e, a) {
|
|
114
|
-
if (v.value++, typeof
|
|
115
|
-
|
|
114
|
+
if (v.value++, typeof b == "function") {
|
|
115
|
+
b({
|
|
116
116
|
onProgress: (t) => {
|
|
117
117
|
const n = s.value.find((o) => o.uid === e.uid);
|
|
118
118
|
n && (n.percent = t);
|
|
@@ -128,7 +128,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
128
128
|
const n = s.value.find((o) => o.uid === e.uid);
|
|
129
129
|
n && (n.status = "success", n.path = t), r.value = [
|
|
130
130
|
...r.value || [],
|
|
131
|
-
|
|
131
|
+
M(y, t, a.name)
|
|
132
132
|
], f.push({
|
|
133
133
|
uid: e.uid,
|
|
134
134
|
path: t
|
|
@@ -139,7 +139,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
try {
|
|
142
|
-
const t = await $(
|
|
142
|
+
const t = await $(z);
|
|
143
143
|
e.oss = t, s.value.push(e), D({
|
|
144
144
|
file: a,
|
|
145
145
|
dirName: B,
|
|
@@ -148,7 +148,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
148
148
|
const o = s.value.find((p) => p.uid === e.uid);
|
|
149
149
|
o && (o.status = "success", o.path = n), r.value = [
|
|
150
150
|
...r.value || [],
|
|
151
|
-
|
|
151
|
+
M(y, n, a.name)
|
|
152
152
|
], f.push({
|
|
153
153
|
uid: e.uid,
|
|
154
154
|
path: n
|
|
@@ -174,7 +174,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
174
174
|
n > -1 && s.value.splice(n, 1), v.value--;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function P(e) {
|
|
178
178
|
var t;
|
|
179
179
|
if (e.path && r) {
|
|
180
180
|
if (Array.isArray(r.value)) {
|
|
@@ -192,8 +192,8 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
192
192
|
}
|
|
193
193
|
return (e, a) => (g(), h("div", {
|
|
194
194
|
class: F({
|
|
195
|
-
[i(
|
|
196
|
-
[i(
|
|
195
|
+
[i(k)()]: !0,
|
|
196
|
+
[i(k)("admin")]: i(O) === "admin"
|
|
197
197
|
})
|
|
198
198
|
}, [
|
|
199
199
|
d("input", {
|
|
@@ -201,7 +201,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
201
201
|
type: "file",
|
|
202
202
|
ref_key: "fileRef",
|
|
203
203
|
ref: x,
|
|
204
|
-
accept: i(
|
|
204
|
+
accept: i(_),
|
|
205
205
|
onChange: G
|
|
206
206
|
}, null, 40, he),
|
|
207
207
|
d("div", ve, [
|
|
@@ -215,7 +215,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
}),
|
|
218
|
-
remove:
|
|
218
|
+
remove: P
|
|
219
219
|
}, () => [
|
|
220
220
|
(g(!0), h(te, null, ne(i(s), (t) => (g(), h("div", {
|
|
221
221
|
key: t.uid,
|
|
@@ -225,11 +225,11 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
225
225
|
d("img", {
|
|
226
226
|
src: t.thumbUrl,
|
|
227
227
|
alt: ""
|
|
228
|
-
}, null, 8,
|
|
229
|
-
ae(d("div",
|
|
228
|
+
}, null, 8, ye),
|
|
229
|
+
ae(d("div", _e, [
|
|
230
230
|
d("div", {
|
|
231
231
|
class: "picture-item-close",
|
|
232
|
-
onClick: (n) =>
|
|
232
|
+
onClick: (n) => P(t)
|
|
233
233
|
}, [
|
|
234
234
|
C(i(re))
|
|
235
235
|
], 8, we),
|
|
@@ -241,7 +241,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
241
241
|
size: 4,
|
|
242
242
|
showInfo: !1
|
|
243
243
|
}, null, 8, ["percent"])
|
|
244
|
-
])) :
|
|
244
|
+
])) : I("", !0)
|
|
245
245
|
], 512), [
|
|
246
246
|
[se, t.status === "uploading"]
|
|
247
247
|
])
|
|
@@ -254,11 +254,11 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
254
254
|
onClick: j
|
|
255
255
|
}, [
|
|
256
256
|
C(i(ce)),
|
|
257
|
-
d("div", null,
|
|
258
|
-
])) :
|
|
257
|
+
d("div", null, U(i(u)("ap.apUpload.update")), 1)
|
|
258
|
+
])) : I("", !0)
|
|
259
259
|
]),
|
|
260
|
-
d("div",
|
|
261
|
-
i(S) ? (g(), h("div",
|
|
260
|
+
d("div", Ue, [
|
|
261
|
+
i(S) ? (g(), h("div", ke, U(i(S)), 1)) : (g(), h("div", Se, U(`${i(u)("ap.apUpload.supportExtension")}:${i(pe)(i(_))},${i(u)(
|
|
262
262
|
"ap.apUpload.maxUploadPictureSize",
|
|
263
263
|
{ maxSize: i(w) }
|
|
264
264
|
)}`), 1))
|
|
@@ -8,54 +8,54 @@ import { DeleteOutlined as he } from "@ant-design/icons-vue";
|
|
|
8
8
|
import q from "../assets/single-file-icon.png.mjs";
|
|
9
9
|
import { useLocale as _e } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as ke } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const ye = ["accept"],
|
|
11
|
+
const ye = ["accept"], we = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "state-un"
|
|
14
|
-
},
|
|
14
|
+
}, De = ["src"], Ce = { class: "state-un-title" }, Ue = { class: "state-un-subtitle" }, Fe = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "state-ing"
|
|
17
17
|
}, Ee = { class: "left" }, Se = ["src"], Ne = { class: "center" }, xe = { class: "center-progress" }, $e = /* @__PURE__ */ ne({
|
|
18
18
|
__name: "SingleFile",
|
|
19
19
|
setup(ze, { expose: j }) {
|
|
20
|
-
const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client:
|
|
20
|
+
const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client: b } = ve(), y = s("theme"), W = s("dirName"), w = s("accept") || "*", D = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), C = s("subTitle"), n = s("value"), U = s("needName"), p = s("uploadingCount"), B = s("beforeUpload"), R = s("customRequest"), J = s("getOssAccess"), K = s("maxSizeErrorMsg"), Q = s("acceptErrorMsg"), o = h(null);
|
|
21
21
|
oe(
|
|
22
22
|
() => n == null ? void 0 : n.value,
|
|
23
23
|
function(e) {
|
|
24
|
-
o.value === null && e &&
|
|
24
|
+
o.value === null && e && M(e);
|
|
25
25
|
},
|
|
26
26
|
{ immediate: !0 }
|
|
27
27
|
);
|
|
28
|
-
function
|
|
28
|
+
function M(e) {
|
|
29
29
|
e ? setTimeout(() => {
|
|
30
|
-
const t = pe(
|
|
30
|
+
const t = pe(U, e);
|
|
31
31
|
l.value = 3, o.value = new File([e], t, {}), n.value = e;
|
|
32
32
|
}) : (l.value = 1, o.value = null, n.value = void 0);
|
|
33
33
|
}
|
|
34
|
-
j({ setValue:
|
|
35
|
-
const l = h(1), f = h(0), m = h(null),
|
|
34
|
+
j({ setValue: M });
|
|
35
|
+
const l = h(1), f = h(0), m = h(null), O = le(() => o.value && (n == null ? void 0 : n.value));
|
|
36
36
|
function X() {
|
|
37
37
|
var e;
|
|
38
38
|
l.value === 1 && ((e = m.value) == null || e.click());
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function P(e) {
|
|
41
41
|
e.preventDefault(), e.stopPropagation();
|
|
42
42
|
}
|
|
43
43
|
function Y(e) {
|
|
44
44
|
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
45
45
|
}
|
|
46
46
|
function Z(e) {
|
|
47
|
-
|
|
47
|
+
T(e);
|
|
48
48
|
}
|
|
49
49
|
function V(e) {
|
|
50
50
|
if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
|
|
51
51
|
return;
|
|
52
|
-
var t = e.dataTransfer, c = [],
|
|
52
|
+
var t = e.dataTransfer, c = [], L = 0, I = t.files.length;
|
|
53
53
|
function v() {
|
|
54
|
-
|
|
54
|
+
L === I - 1 && Z(c), L++;
|
|
55
55
|
}
|
|
56
56
|
if (t.items !== void 0)
|
|
57
|
-
for (var
|
|
58
|
-
var E = t.items[
|
|
57
|
+
for (var F = 0; F < t.items.length; F++) {
|
|
58
|
+
var E = t.items[F];
|
|
59
59
|
if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
|
|
60
60
|
var ae = E.getAsFile();
|
|
61
61
|
c.push(ae), v();
|
|
@@ -87,33 +87,33 @@ const ye = ["accept"], De = {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function ee(e) {
|
|
90
|
+
async function ee(e) {
|
|
91
91
|
const t = e.target;
|
|
92
|
-
|
|
92
|
+
await T(t == null ? void 0 : t.files), m.value && (m.value.value = "");
|
|
93
93
|
}
|
|
94
|
-
async function
|
|
94
|
+
async function T(e) {
|
|
95
95
|
if (e != null && e.length) {
|
|
96
|
-
if (typeof
|
|
97
|
-
if (
|
|
96
|
+
if (typeof B == "function") {
|
|
97
|
+
if (await B(e[0]) === !1)
|
|
98
98
|
return;
|
|
99
99
|
} else {
|
|
100
|
-
if (e[0].size >
|
|
100
|
+
if (e[0].size > D * 1024 * 1024) {
|
|
101
101
|
u.warning(
|
|
102
102
|
K || r("ap.apUpload.maxUploadFileSize", {
|
|
103
|
-
maxSize:
|
|
103
|
+
maxSize: D
|
|
104
104
|
})
|
|
105
105
|
);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
if (!fe(e[0],
|
|
108
|
+
if (!fe(e[0], w)) {
|
|
109
109
|
u.warning(
|
|
110
110
|
Q || r("ap.apUpload.fileFormatNotSupported")
|
|
111
111
|
);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof
|
|
116
|
-
|
|
115
|
+
if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof R == "function") {
|
|
116
|
+
R({
|
|
117
117
|
onProgress: (t) => {
|
|
118
118
|
f.value = t;
|
|
119
119
|
},
|
|
@@ -122,7 +122,7 @@ const ye = ["accept"], De = {
|
|
|
122
122
|
},
|
|
123
123
|
onSuccess: (t) => {
|
|
124
124
|
n.value = $(
|
|
125
|
-
|
|
125
|
+
U,
|
|
126
126
|
t,
|
|
127
127
|
o.value.name
|
|
128
128
|
), l.value = 3, p.value--;
|
|
@@ -135,10 +135,10 @@ const ye = ["accept"], De = {
|
|
|
135
135
|
await de(J), G({
|
|
136
136
|
file: o.value,
|
|
137
137
|
dirName: W,
|
|
138
|
-
oss:
|
|
138
|
+
oss: b,
|
|
139
139
|
successCallBack(t) {
|
|
140
140
|
n.value = $(
|
|
141
|
-
|
|
141
|
+
U,
|
|
142
142
|
t,
|
|
143
143
|
o.value.name
|
|
144
144
|
), l.value = 3, p.value--;
|
|
@@ -158,7 +158,7 @@ const ye = ["accept"], De = {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
function te() {
|
|
161
|
-
o.value && !(n != null && n.value) &&
|
|
161
|
+
o.value && !(n != null && n.value) && b.pauseUpload(), l.value = 1, o.value = null, n.value = void 0;
|
|
162
162
|
}
|
|
163
163
|
return (e, t) => {
|
|
164
164
|
var c;
|
|
@@ -169,9 +169,9 @@ const ye = ["accept"], De = {
|
|
|
169
169
|
[a(k)("un")]: l.value === 1
|
|
170
170
|
}),
|
|
171
171
|
onClick: X,
|
|
172
|
-
onDragenter:
|
|
172
|
+
onDragenter: P,
|
|
173
173
|
onDragover: Y,
|
|
174
|
-
onDragleave:
|
|
174
|
+
onDragleave: P,
|
|
175
175
|
onDrop: V
|
|
176
176
|
}, [
|
|
177
177
|
i("input", {
|
|
@@ -179,22 +179,22 @@ const ye = ["accept"], De = {
|
|
|
179
179
|
type: "file",
|
|
180
180
|
ref_key: "fileRef",
|
|
181
181
|
ref: m,
|
|
182
|
-
accept: a(
|
|
182
|
+
accept: a(w),
|
|
183
183
|
onChange: ee
|
|
184
184
|
}, null, 40, ye),
|
|
185
|
-
l.value === 1 ? (_(), x("div",
|
|
185
|
+
l.value === 1 ? (_(), x("div", we, [
|
|
186
186
|
i("img", {
|
|
187
187
|
class: "state-un-icon",
|
|
188
188
|
src: a(q)
|
|
189
|
-
}, null, 8,
|
|
190
|
-
i("div",
|
|
191
|
-
i("div",
|
|
192
|
-
a(
|
|
189
|
+
}, null, 8, De),
|
|
190
|
+
i("div", Ce, z(a(H)), 1),
|
|
191
|
+
i("div", Ue, z(typeof a(C) == "string" && a(C).length > 0 ? a(C) : `${a(r)("ap.apUpload.supportExtension")}:${a(me)(
|
|
192
|
+
a(w)
|
|
193
193
|
)},${a(r)("ap.apUpload.maxWarnUploadFileSize", {
|
|
194
|
-
maxSize: a(
|
|
194
|
+
maxSize: a(D)
|
|
195
195
|
})}`), 1)
|
|
196
196
|
])) : A("", !0),
|
|
197
|
-
[2, 3].includes(l.value) ? (_(), x("div",
|
|
197
|
+
[2, 3].includes(l.value) ? (_(), x("div", Fe, [
|
|
198
198
|
i("div", Ee, [
|
|
199
199
|
i("img", { src: a(q) }, null, 8, Se)
|
|
200
200
|
]),
|
|
@@ -202,11 +202,11 @@ const ye = ["accept"], De = {
|
|
|
202
202
|
i("div", {
|
|
203
203
|
class: "center-title",
|
|
204
204
|
style: re({
|
|
205
|
-
color:
|
|
205
|
+
color: O.value ? "#0070FF" : "#182948"
|
|
206
206
|
})
|
|
207
207
|
}, z((c = o.value) == null ? void 0 : c.name), 5),
|
|
208
208
|
i("div", xe, [
|
|
209
|
-
|
|
209
|
+
O.value ? A("", !0) : (_(), ie(a(ge), {
|
|
210
210
|
key: 0,
|
|
211
211
|
percent: f.value,
|
|
212
212
|
size: 4,
|
|
@@ -27,7 +27,7 @@ const X = ["onClick"], de = /* @__PURE__ */ T({
|
|
|
27
27
|
const { b: $, e: i, em: C } = K("ap-appendix"), { t: y } = Q(), e = O, x = w("apUpload"), k = w(
|
|
28
28
|
"downloadCenterTriggerConfig"
|
|
29
29
|
), f = d(
|
|
30
|
-
() => J(e == null ? void 0 : e.needName, e == null ? void 0 : e.fileList)
|
|
30
|
+
() => J(e == null ? void 0 : e.needName, (e == null ? void 0 : e.fileList) ?? [])
|
|
31
31
|
), B = d(
|
|
32
32
|
() => {
|
|
33
33
|
var l;
|
|
@@ -25,7 +25,8 @@ const o = {
|
|
|
25
25
|
colorError: "#FF4D4F",
|
|
26
26
|
// 警告色
|
|
27
27
|
colorWarning: "#FFA940",
|
|
28
|
-
colorBgContainerDisabled: "#
|
|
28
|
+
colorBgContainerDisabled: "#F2F6F9",
|
|
29
|
+
colorTextDisabled: "#526A90",
|
|
29
30
|
wireframe: !1,
|
|
30
31
|
colorBgLayout: "#F2F6F9",
|
|
31
32
|
colorBgSpotlight: "#000000cc",
|
|
@@ -39,6 +40,7 @@ const o = {
|
|
|
39
40
|
colorPrimaryHover: "#85D4B0",
|
|
40
41
|
colorPrimaryActive: "#5DC596",
|
|
41
42
|
colorBgContainerDisabled: "#f5f5f5",
|
|
43
|
+
colorTextDisabled: "#F5F5F5",
|
|
42
44
|
// 字体颜色
|
|
43
45
|
colorText: "#333333",
|
|
44
46
|
colorTextSecondary: "#666666",
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
.ant-form .ant-form-item-control .ant-form-item-explain-error {
|
|
11
11
|
font-size: 12px;
|
|
12
12
|
}
|
|
13
|
-
.ant-form .ant-form-item-control .ant-select.ant-select-open .ant-select-selection-item {
|
|
14
|
-
color: #bfbfbf;
|
|
15
|
-
}
|
|
16
13
|
.ant-input::-moz-placeholder {
|
|
17
14
|
color: #bfbfbf;
|
|
18
15
|
}
|
|
@@ -87,9 +87,6 @@
|
|
|
87
87
|
.ant-form .ant-form-item-control .ant-form-item-explain-error {
|
|
88
88
|
font-size: 12px;
|
|
89
89
|
}
|
|
90
|
-
.ant-form .ant-form-item-control .ant-select.ant-select-open .ant-select-selection-item {
|
|
91
|
-
color: #bfbfbf;
|
|
92
|
-
}
|
|
93
90
|
.ant-input::-moz-placeholder {
|
|
94
91
|
color: #bfbfbf;
|
|
95
92
|
}
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
.ant-form .ant-form-item-control .ant-form-item-explain-error {
|
|
11
11
|
font-size: 12px;
|
|
12
12
|
}
|
|
13
|
-
.ant-form .ant-form-item-control .ant-select.ant-select-disabled .ant-select-selector {
|
|
14
|
-
color: #526a90;
|
|
15
|
-
background-color: #f2f6f9;
|
|
16
|
-
}
|
|
17
13
|
.ant-input::-moz-placeholder {
|
|
18
14
|
color: #abb7cc;
|
|
19
15
|
}
|
|
@@ -87,10 +87,6 @@
|
|
|
87
87
|
.ant-form .ant-form-item-control .ant-form-item-explain-error {
|
|
88
88
|
font-size: 12px;
|
|
89
89
|
}
|
|
90
|
-
.ant-form .ant-form-item-control .ant-select.ant-select-disabled .ant-select-selector {
|
|
91
|
-
color: #526a90;
|
|
92
|
-
background-color: #f2f6f9;
|
|
93
|
-
}
|
|
94
90
|
.ant-input::-moz-placeholder {
|
|
95
91
|
color: #abb7cc;
|
|
96
92
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DrawerProps } from '@aplus-frontend/antdv';
|
|
2
|
-
export type CreateDrawerFuncProps<ContentRecord = any> = Omit<DrawerProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onClose' | 'getContainer' | 'extra' | 'footer'> & Partial<{
|
|
2
|
+
export type CreateDrawerFuncProps<ContentRecord = any> = Omit<DrawerProps, 'visible' | 'onUpdate:visible' | 'afterVisibleChange' | 'onAfterVisibleOChange' | 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onClose' | 'getContainer' | 'extra' | 'footer'> & Partial<{
|
|
3
3
|
onClose: (params: ContentRecord) => any | Promise<any>;
|
|
4
4
|
getContainer: HTMLElement;
|
|
5
5
|
content: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),q=require("@aplus-frontend/antdv"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),q=require("@aplus-frontend/antdv"),b=require("../../config-provider/config-provider.js"),D=require("lodash-unified"),O=l=>{let o,u;const{destroyOnClose:h=!0}=l;function f(){o&&o(!1),setTimeout(()=>{var e;t.render(null,n),(e=n.parentElement)==null||e.removeChild(n)},500)}function x(){o&&o(!0)}function C(){o&&o(!1)}function P(e){u&&u(e)}const w=t.defineComponent({data(){return{open:h,props:l}},methods:{async handleClose(){var e,r,s,i,a;if((e=this.props)!=null&&e.onClose){const p=((i=(s=(r=this.props)==null?void 0:r.content)==null?void 0:s.component)==null?void 0:i.exposed)??void 0;await((a=this.props)==null?void 0:a.onClose(p))}h?f():C()}},created(){o=e=>{this.open=e},u=e=>{this.props={...this.props,...e}}},render(){var i,a,p;const e=D.omit(this.props,["onClose","extra","footer","visible","onUpdate:visible","afterVisibleChange","onAfterVisibleOChange","open","onUpdate:open","getContainer"]),r=((p=(a=(i=this.props)==null?void 0:i.content)==null?void 0:a.component)==null?void 0:p.exposed)??void 0,s=()=>h?f():C();return t.createVNode(b.ConfigProvider,b.globalConfigCached.value,{default:()=>{var d,m,c,g;return[t.createVNode(q.Drawer,t.mergeProps({open:this.open,onClose:this.handleClose,extra:(m=(d=this.props)==null?void 0:d.extra)==null?void 0:m.call(d,r,s),footer:(g=(c=this.props)==null?void 0:c.footer)==null?void 0:g.call(c,r,s)},e),{default:()=>{var v;return[(v=this.props)==null?void 0:v.content]}})]}})}}),y=l.getContainer||document.body,n=document.createElement("div");return y.appendChild(n),t.render(t.h(w),n),{destroy:f,update:P,open:x,close:C}};exports.createDrawer=O;
|
|
@@ -6,16 +6,19 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
6
6
|
emptyText: string;
|
|
7
7
|
mode: string;
|
|
8
8
|
options: () => never[];
|
|
9
|
+
disabled: undefined;
|
|
9
10
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
10
11
|
"update:value": (...args: any[]) => void;
|
|
11
12
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFieldCheckboxProps>, {
|
|
12
13
|
emptyText: string;
|
|
13
14
|
mode: string;
|
|
14
15
|
options: () => never[];
|
|
16
|
+
disabled: undefined;
|
|
15
17
|
}>>> & {
|
|
16
18
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
17
19
|
}, {
|
|
18
20
|
mode: FieldMode;
|
|
21
|
+
disabled: boolean;
|
|
19
22
|
options: (string | number | CheckboxOptionType)[];
|
|
20
23
|
emptyText: string;
|
|
21
24
|
}, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("lodash-unified"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const c=require("./helper.js");require("../../config-provider/index.js");const y=require("../hooks/use-options.js"),B=require("../../config-provider/hooks/use-namespace.js"),g=require("../../hooks/useControllableValue.js"),q=e.defineComponent({name:"ApFieldCheckbox",inheritAttrs:!1,__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},value:{},onChange:{},"onUpdate:value":{},name:{},prefixCls:{},options:{default:()=>[]},disabled:{type:Boolean},id:{},emptyText:{default:"--"},request:{},vertical:{type:Boolean}},emits:["update:value"],setup(p,{emit:d}){const f=d,t=p,{options:u,updateOptions:m}=y.default(t),{m:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("lodash-unified"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const c=require("./helper.js");require("../../config-provider/index.js");const y=require("../hooks/use-options.js"),B=require("../../config-provider/hooks/use-namespace.js"),g=require("../../hooks/useControllableValue.js"),q=e.defineComponent({name:"ApFieldCheckbox",inheritAttrs:!1,__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},value:{},onChange:{},"onUpdate:value":{},name:{},prefixCls:{},options:{default:()=>[]},disabled:{type:Boolean,default:void 0},id:{},emptyText:{default:"--"},request:{},vertical:{type:Boolean}},emits:["update:value"],setup(p,{emit:d}){const f=d,t=p,{options:u,updateOptions:m}=y.default(t),{m:v}=B.useNamespace("field-checkbox"),l=e.ref(!1);e.onMounted(()=>{r.isFunction(t.request)&&(l.value=!0,t.request().then(n=>m(n)).finally(()=>{l.value=!1}))});const{value:o,updateValue:k}=g.useControllableValue(t,f,{defaultValue:[]});return(n,x)=>{var s;return n.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(r.isNil)(e.unref(o))?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.emptyText),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(((s=e.unref(u))==null?void 0:s.filter(a=>e.unref(o).indexOf(e.unref(c.getOptionValue)(a))>-1).map(a=>e.unref(c.getOptionLabel)(a)).join("、"))||t.emptyText),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.value?(e.openBlock(),e.createBlock(e.unref(i.Spin),{key:0,size:"small"})):(e.openBlock(),e.createBlock(e.unref(i.CheckboxGroup),e.mergeProps({key:1},e.unref(r.omit)(t,["onUpdate:value","value","request","vertical"]),{options:e.unref(u),value:e.unref(o),"onUpdate:value":e.unref(k),class:n.vertical?e.unref(v)("vertical"):null}),null,16,["options","value","onUpdate:value","class"]))],64))}}});exports.default=q;
|
|
@@ -472,6 +472,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
472
472
|
max: number;
|
|
473
473
|
min: number;
|
|
474
474
|
step: number;
|
|
475
|
+
disabled: undefined;
|
|
475
476
|
}>, {
|
|
476
477
|
focus: typeof focus;
|
|
477
478
|
blur: typeof blur;
|
|
@@ -486,9 +487,11 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
486
487
|
max: number;
|
|
487
488
|
min: number;
|
|
488
489
|
step: number;
|
|
490
|
+
disabled: undefined;
|
|
489
491
|
}>>> & {
|
|
490
492
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
491
493
|
}, {
|
|
494
|
+
disabled: boolean;
|
|
492
495
|
bordered: boolean;
|
|
493
496
|
keyboard: boolean;
|
|
494
497
|
max: ValueType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("@aplus-frontend/antdv");require("../../hooks/index.js");const s=require("lodash-unified"),i=require("@fruits-chain/utils"),S=require("./helper.js");require("../../config-provider/index.js");const g=require("../hooks/use-default-placeholder.js"),q=require("../../config-provider/hooks/use-namespace.js"),C=require("../../hooks/useControllableValue.js"),N=e.defineComponent({name:"ApFieldNumber",__name:"index",props:{mode:{},class:{},style:{},size:{},bordered:{type:Boolean,default:!0},placeholder:{},name:{},id:{},type:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},"onUpdate:value":{},valueModifiers:{},status:{},stringMode:{type:Boolean},defaultValue:{},value:{},prefixCls:{},min:{default:-1/0},max:{default:1/0},step:{default:1},tabindex:{},controls:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},autofocus:{type:Boolean},keyboard:{type:Boolean,default:!0},parser:{},formatter:{},precision:{},decimalSeparator:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},emptyText:{default:"--"},thousands:{type:Boolean,default:!1},limitDecimalsRetain:{type:Boolean}},emits:["update:value"],setup(d,{expose:p,emit:c}){const f=c,{b:a}=q.useNamespace("field-number"),o=d,l=e.ref(),{value:n,updateValue:m}=C.useControllableValue(o,f),y=g.useDefaultPlaceholder("Number",o),v=e.computed(()=>{let t=e.unref(n);if(s.isNil(t))return o.emptyText;o.precision&&(t=i.roundWith(t,o.precision));let r=o.thousands?i.toDecimalMark(t):String(t);return o.precision&&o.limitDecimalsRetain&&(r=S.addZeroToDecimalPlaces(r,o.precision)),r});function B(){var t;(t=l.value)==null||t.focus()}function b(){var t;(t=l.value)==null||t.blur()}return p({focus:B,blur:b}),(t,r)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a)("label-left"))},[e.renderSlot(t.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(v.value),1),t.$slots.addonAfter?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a)("label-right"))},[e.renderSlot(t.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(k.InputNumber),e.mergeProps({key:1},e.unref(s.omit)(o,["value","onUpdate:value"]),{placeholder:e.unref(y),value:e.unref(n),"onUpdate:value":e.unref(m),ref_key:"inputRef",ref:l}),e.createSlots({_:2},[e.renderList(t.$slots,(P,u)=>({name:u,fn:e.withCtx(h=>[e.renderSlot(t.$slots,u,e.normalizeProps(e.guardReactiveProps(h||{})))])}))]),1040,["placeholder","value","onUpdate:value"]))}});exports.default=N;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("@aplus-frontend/antdv");require("../../hooks/index.js");const s=require("lodash-unified"),i=require("@fruits-chain/utils"),S=require("./helper.js");require("../../config-provider/index.js");const g=require("../hooks/use-default-placeholder.js"),q=require("../../config-provider/hooks/use-namespace.js"),C=require("../../hooks/useControllableValue.js"),N=e.defineComponent({name:"ApFieldNumber",__name:"index",props:{mode:{},class:{},style:{},size:{},bordered:{type:Boolean,default:!0},placeholder:{},name:{},id:{},type:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},"onUpdate:value":{},valueModifiers:{},status:{},stringMode:{type:Boolean},defaultValue:{},value:{},prefixCls:{},min:{default:-1/0},max:{default:1/0},step:{default:1},tabindex:{},controls:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean},keyboard:{type:Boolean,default:!0},parser:{},formatter:{},precision:{},decimalSeparator:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},emptyText:{default:"--"},thousands:{type:Boolean,default:!1},limitDecimalsRetain:{type:Boolean}},emits:["update:value"],setup(d,{expose:p,emit:c}){const f=c,{b:a}=q.useNamespace("field-number"),o=d,l=e.ref(),{value:n,updateValue:m}=C.useControllableValue(o,f),y=g.useDefaultPlaceholder("Number",o),v=e.computed(()=>{let t=e.unref(n);if(s.isNil(t))return o.emptyText;o.precision&&(t=i.roundWith(t,o.precision));let r=o.thousands?i.toDecimalMark(t):String(t);return o.precision&&o.limitDecimalsRetain&&(r=S.addZeroToDecimalPlaces(r,o.precision)),r});function B(){var t;(t=l.value)==null||t.focus()}function b(){var t;(t=l.value)==null||t.blur()}return p({focus:B,blur:b}),(t,r)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a)("label-left"))},[e.renderSlot(t.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(v.value),1),t.$slots.addonAfter?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a)("label-right"))},[e.renderSlot(t.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(k.InputNumber),e.mergeProps({key:1},e.unref(s.omit)(o,["value","onUpdate:value"]),{placeholder:e.unref(y),value:e.unref(n),"onUpdate:value":e.unref(m),ref_key:"inputRef",ref:l}),e.createSlots({_:2},[e.renderList(t.$slots,(P,u)=>({name:u,fn:e.withCtx(h=>[e.renderSlot(t.$slots,u,e.normalizeProps(e.guardReactiveProps(h||{})))])}))]),1040,["placeholder","value","onUpdate:value"]))}});exports.default=N;
|
|
@@ -7,6 +7,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
7
7
|
emptyText: string;
|
|
8
8
|
mode: string;
|
|
9
9
|
vertical: boolean;
|
|
10
|
+
disabled: undefined;
|
|
10
11
|
}>, {
|
|
11
12
|
focus: typeof focus;
|
|
12
13
|
blur: typeof blur;
|
|
@@ -16,11 +17,13 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
16
17
|
emptyText: string;
|
|
17
18
|
mode: string;
|
|
18
19
|
vertical: boolean;
|
|
20
|
+
disabled: undefined;
|
|
19
21
|
}>>> & {
|
|
20
22
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
21
23
|
}, {
|
|
22
24
|
mode: FieldMode;
|
|
23
25
|
vertical: boolean;
|
|
26
|
+
disabled: boolean;
|
|
24
27
|
emptyText: string;
|
|
25
28
|
}, {}>;
|
|
26
29
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const c=require("lodash-unified"),p=require("./helper.js");require("../../config-provider/index.js");const T=require("../hooks/use-options.js"),_=require("../../hooks/useControllableValue.js"),V=require("../../config-provider/hooks/use-namespace.js"),h=e.defineComponent({name:"ApFieldRadio",__name:"index",props:{mode:{default:"edit"},class:{},style:{},prefixCls:{},value:{},size:{},options:{},disabled:{type:Boolean},name:{},buttonStyle:{},id:{},optionType:{},onChange:{},"onUpdate:value":{},emptyText:{default:"--"},request:{},vertical:{type:Boolean,default:!1}},emits:["update:value"],setup(d,{expose:f,emit:v}){const o=d,m=v,a=e.ref(),{options:l,updateOptions:y}=T.default(o),{value:r,updateValue:k}=_.useControllableValue(o,m),{m:q}=V.useNamespace("field-radio"),u=e.ref(!1);e.onMounted(()=>{var t;o.request&&(u.value=!0,(t=o.request)==null||t.call(o).then(n=>y(n)).finally(()=>{u.value=!1}))});const g=e.computed(()=>{var s;const t=e.unref(r);if(c.isNil(t))return o.emptyText;const n=(s=l.value)==null?void 0:s.find(x=>t===p.getOptionValue(x));return p.getOptionLabel(n)||o.emptyText});function B(){var t;(t=a.value)==null||t.focus()}function b(){var t;(t=a.value)==null||t.blur()}return f({focus:B,blur:b}),(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value?(e.openBlock(),e.createBlock(e.unref(i.Spin),{key:0,size:"small"})):(e.openBlock(),e.createBlock(e.unref(i.RadioGroup),e.mergeProps({key:1},e.unref(c.omit)(o,["value","onUpdate:value","options","request","vertical"]),{value:e.unref(r),"onUpdate:value":e.unref(k),options:e.unref(l),ref_key:"radioGroupRef",ref:a,class:t.vertical?e.unref(q)("vertical"):null}),null,16,["value","onUpdate:value","options","class"]))],64))}});exports.default=h;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const c=require("lodash-unified"),p=require("./helper.js");require("../../config-provider/index.js");const T=require("../hooks/use-options.js"),_=require("../../hooks/useControllableValue.js"),V=require("../../config-provider/hooks/use-namespace.js"),h=e.defineComponent({name:"ApFieldRadio",__name:"index",props:{mode:{default:"edit"},class:{},style:{},prefixCls:{},value:{},size:{},options:{},disabled:{type:Boolean,default:void 0},name:{},buttonStyle:{},id:{},optionType:{},onChange:{},"onUpdate:value":{},emptyText:{default:"--"},request:{},vertical:{type:Boolean,default:!1}},emits:["update:value"],setup(d,{expose:f,emit:v}){const o=d,m=v,a=e.ref(),{options:l,updateOptions:y}=T.default(o),{value:r,updateValue:k}=_.useControllableValue(o,m),{m:q}=V.useNamespace("field-radio"),u=e.ref(!1);e.onMounted(()=>{var t;o.request&&(u.value=!0,(t=o.request)==null||t.call(o).then(n=>y(n)).finally(()=>{u.value=!1}))});const g=e.computed(()=>{var s;const t=e.unref(r);if(c.isNil(t))return o.emptyText;const n=(s=l.value)==null?void 0:s.find(x=>t===p.getOptionValue(x));return p.getOptionLabel(n)||o.emptyText});function B(){var t;(t=a.value)==null||t.focus()}function b(){var t;(t=a.value)==null||t.blur()}return f({focus:B,blur:b}),(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value?(e.openBlock(),e.createBlock(e.unref(i.Spin),{key:0,size:"small"})):(e.openBlock(),e.createBlock(e.unref(i.RadioGroup),e.mergeProps({key:1},e.unref(c.omit)(o,["value","onUpdate:value","options","request","vertical"]),{value:e.unref(r),"onUpdate:value":e.unref(k),options:e.unref(l),ref_key:"radioGroupRef",ref:a,class:t.vertical?e.unref(q)("vertical"):null}),null,16,["value","onUpdate:value","options","class"]))],64))}});exports.default=h;
|
|
@@ -136,7 +136,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
136
136
|
autofocus: boolean;
|
|
137
137
|
count: number;
|
|
138
138
|
character: undefined;
|
|
139
|
-
disabled:
|
|
139
|
+
disabled: undefined;
|
|
140
140
|
}>, {
|
|
141
141
|
focus: typeof focus;
|
|
142
142
|
blur: typeof blur;
|
|
@@ -149,7 +149,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
149
149
|
autofocus: boolean;
|
|
150
150
|
count: number;
|
|
151
151
|
character: undefined;
|
|
152
|
-
disabled:
|
|
152
|
+
disabled: undefined;
|
|
153
153
|
}>>> & {
|
|
154
154
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
155
155
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("lodash-unified");require("../../hooks/index.js");const b=require("@aplus-frontend/antdv"),h=require("../../hooks/useControllableValue.js"),y=e.defineComponent({name:"ApFieldRate",__name:"index",props:{mode:{default:"edit"},class:{},style:{},prefixCls:{},count:{default:5},value:{},allowHalf:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},tooltips:{},disabled:{type:Boolean,default
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("lodash-unified");require("../../hooks/index.js");const b=require("@aplus-frontend/antdv"),h=require("../../hooks/useControllableValue.js"),y=e.defineComponent({name:"ApFieldRate",__name:"index",props:{mode:{default:"edit"},class:{},style:{},prefixCls:{},count:{default:5},value:{},allowHalf:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},tooltips:{},disabled:{type:Boolean,default:void 0},character:{default:void 0},autofocus:{type:Boolean,default:!1},tabindex:{},direction:{},id:{},onChange:{},onHoverChange:{},"onUpdate:value":{},onFocus:{},onBlur:{},onKeydown:{},defaultValue:{}},emits:["update:value"],setup(u,{expose:r,emit:n}){const o=u,l=e.ref(),s=n,d=e.useSlots(),{value:c,updateValue:i}=h.useControllableValue(o,s),f=e.computed(()=>o.mode==="read"?!0:o.disabled);function p(){var t,a;(a=(t=l.value)==null?void 0:t.focus)==null||a.call(t)}function v(){var t,a;(a=(t=l.value)==null?void 0:t.blur)==null||a.call(t)}return r({focus:p,blur:v}),(t,a)=>(e.openBlock(),e.createBlock(e.unref(b.Rate),e.mergeProps(e.unref(m.omit)(o,["mode","defaultValue"]),{value:e.unref(c),"onUpdate:value":e.unref(i),disabled:f.value,ref_key:"rateRef",ref:l}),e.createSlots({_:2},[d.character?{name:"character",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"character")]),key:"0"}:void 0]),1040,["value","onUpdate:value","disabled"]))}});exports.default=y;
|