@aplus-frontend/ui 0.1.24 → 0.1.26
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 +58 -55
- package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
- package/es/src/ap-form/search-form/index.vue.mjs +1 -0
- package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
- package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
- package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
- package/es/src/ap-layout/index.d.ts +2 -1
- package/es/src/ap-layout/index.mjs +2 -1
- package/es/src/ap-layout/interface.d.ts +8 -2
- package/es/src/ap-layout/interface.mjs +1 -0
- package/es/src/ap-layout/style/ap-info-layout.css +17 -0
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
- package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -27
- package/es/src/business/ap-input-radio/interface.d.ts +4 -3
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +176 -0
- package/es/src/business/ap-ladder/interface.d.ts +134 -0
- package/es/src/business/ap-ladder/interface.mjs +10 -0
- package/es/src/business/ap-ladder/style.css +56 -0
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +3 -1
- package/es/src/business/hooks/usePageListApTable.d.ts +25 -3
- package/es/src/business/hooks/usePageListApTable.mjs +40 -29
- package/es/src/business/hooks/useTableRefresh.d.ts +17 -0
- package/es/src/business/hooks/useTableRefresh.mjs +16 -0
- package/es/src/business/index.d.ts +719 -9
- package/es/src/business/index.mjs +25 -22
- package/es/src/components.d.ts +1 -0
- package/es/src/index.mjs +206 -203
- package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
- package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
- package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
- package/lib/src/ap-layout/index.d.ts +2 -1
- package/lib/src/ap-layout/index.js +1 -1
- package/lib/src/ap-layout/interface.d.ts +8 -2
- package/lib/src/ap-layout/interface.js +1 -0
- package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
- 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-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +4 -3
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
- package/lib/src/business/ap-ladder/interface.d.ts +134 -0
- package/lib/src/business/ap-ladder/interface.js +1 -0
- package/lib/src/business/ap-ladder/style.css +56 -0
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +25 -3
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +17 -0
- package/lib/src/business/hooks/useTableRefresh.js +1 -0
- package/lib/src/business/index.d.ts +719 -9
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/package.json +1 -1
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
- /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
- /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as J, inject as u, ref as R, watch as K, openBlock as f, createElementBlock as h, normalizeClass as Q, unref as i, createElementVNode as p, Fragment as W, renderList as X, withDirectives as Y, createVNode as C, createCommentVNode as $, vShow as Z, toDisplayString as U } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getPath as
|
|
4
|
-
import { CloseOutlined as
|
|
5
|
-
import { useOss as
|
|
6
|
-
import { fileMatchesAccept as
|
|
7
|
-
import { message as
|
|
3
|
+
import { getPath as F, getName as ee, getReturnData as w } from "../utils/returnData.mjs";
|
|
4
|
+
import { CloseOutlined as te, PlusOutlined as ne } from "@ant-design/icons-vue";
|
|
5
|
+
import { useOss as ae, getOssInstance as D } from "../hooks/useOss.mjs";
|
|
6
|
+
import { fileMatchesAccept as se, getAcceptText as oe } from "../utils/accept.mjs";
|
|
7
|
+
import { message as d, Progress as ie } from "ant-design-vue";
|
|
8
8
|
import "../styles/picture.css";
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
9
|
+
import { useLocale as ce } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const re = ["accept"], le = { class: "picture-context" }, pe = { class: "picture-item-box" }, de = ["src"], me = { class: "picture-item-shadow" }, fe = ["onClick"], he = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "picture-item-uploading"
|
|
14
|
-
},
|
|
14
|
+
}, ge = { class: "picture-title" }, ve = { key: 0 }, _e = { key: 1 }, ze = /* @__PURE__ */ J({
|
|
15
15
|
__name: "Picture",
|
|
16
|
-
setup(
|
|
17
|
-
const { t: r } =
|
|
18
|
-
let
|
|
16
|
+
setup(xe) {
|
|
17
|
+
const { t: r } = ce(), { b: A } = ue("ap-upload-picture"), { put: E } = ae(), O = u("theme"), T = u("dirName"), y = u("accept") || "image/*", k = u("maxSize") ?? 5, N = u("title"), l = u("maxCount") ?? 10, g = u("uploadingCount"), P = u("beforeUpload"), S = u("customRequest"), b = u("getOssAccess"), x = R(null), c = u("value"), v = u("needName");
|
|
18
|
+
let o = R([]);
|
|
19
19
|
const _ = [];
|
|
20
|
-
|
|
20
|
+
K(
|
|
21
21
|
() => c == null ? void 0 : c.value,
|
|
22
22
|
async function(e) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
var a;
|
|
24
|
+
if (!((a = o == null ? void 0 : o.value) != null && a.length) && e) {
|
|
25
|
+
const n = [];
|
|
25
26
|
for (let t of e) {
|
|
26
|
-
const
|
|
27
|
-
...new File([t],
|
|
27
|
+
const s = F(v, t), m = ee(v, t), I = await D(b), G = await I.getSignatureUrl(s), H = {
|
|
28
|
+
...new File([t], m, {}),
|
|
28
29
|
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
29
|
-
thumbUrl:
|
|
30
|
+
thumbUrl: G,
|
|
30
31
|
status: "success",
|
|
31
32
|
percent: 100,
|
|
32
|
-
path:
|
|
33
|
+
path: s
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
n.push(H), I.destroy();
|
|
35
36
|
}
|
|
36
|
-
if (l &&
|
|
37
|
-
|
|
37
|
+
if (l && n.length > l) {
|
|
38
|
+
d.warning(
|
|
38
39
|
r("ap.apUpload.fileInitializationException", {
|
|
39
40
|
maxCount: l
|
|
40
41
|
})
|
|
41
42
|
);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
n.forEach((t) => {
|
|
46
|
+
o.value.push(t), _.push({
|
|
46
47
|
uid: t.uid,
|
|
47
48
|
path: t.path
|
|
48
49
|
});
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
}
|
|
52
|
+
},
|
|
53
|
+
{ immediate: !0 }
|
|
52
54
|
);
|
|
53
|
-
function
|
|
55
|
+
function B() {
|
|
54
56
|
var e;
|
|
55
57
|
(e = x.value) == null || e.click();
|
|
56
58
|
}
|
|
57
|
-
function
|
|
59
|
+
function q(e) {
|
|
58
60
|
const a = e.target;
|
|
59
61
|
L(a == null ? void 0 : a.files);
|
|
60
62
|
}
|
|
61
63
|
function L(e) {
|
|
62
64
|
if (e != null && e.length)
|
|
63
65
|
for (let a = 0; a < e.length; a++)
|
|
64
|
-
|
|
66
|
+
M(e[a]);
|
|
65
67
|
x.value && (x.value.value = "");
|
|
66
68
|
}
|
|
67
69
|
let z;
|
|
68
|
-
function
|
|
69
|
-
if (l && l > 1 &&
|
|
70
|
+
function M(e) {
|
|
71
|
+
if (l && l > 1 && o.value.length >= l)
|
|
70
72
|
return clearTimeout(z), z = setTimeout(() => {
|
|
71
|
-
|
|
73
|
+
d.warning(
|
|
72
74
|
r("ap.apUpload.maxUploadPicture", { maxCount: l })
|
|
73
75
|
);
|
|
74
76
|
}), !1;
|
|
@@ -77,45 +79,45 @@ const ue = ["accept"], re = { class: "picture-context" }, le = { class: "picture
|
|
|
77
79
|
return !1;
|
|
78
80
|
} else {
|
|
79
81
|
if (e.size > k * 1024 * 1024)
|
|
80
|
-
return
|
|
82
|
+
return d.warning(
|
|
81
83
|
r("ap.apUpload.maxUploadFileSize", { maxSize: k })
|
|
82
84
|
), !1;
|
|
83
|
-
if (!/image\/\w+/.test(e.type) || !
|
|
84
|
-
return
|
|
85
|
+
if (!/image\/\w+/.test(e.type) || !se(e, y))
|
|
86
|
+
return d.warning(r("ap.apUpload.pictureFormatNotSupported")), !1;
|
|
85
87
|
}
|
|
86
88
|
const a = new FileReader();
|
|
87
89
|
a.readAsDataURL(e), a.onload = function() {
|
|
88
|
-
const
|
|
90
|
+
const n = {
|
|
89
91
|
...e,
|
|
90
92
|
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
91
93
|
thumbUrl: this.result,
|
|
92
94
|
status: "uploading",
|
|
93
95
|
percent: 0
|
|
94
96
|
};
|
|
95
|
-
|
|
97
|
+
V(n, e);
|
|
96
98
|
}, a.onerror = function() {
|
|
97
|
-
|
|
99
|
+
d.warning(r("ap.apUpload.imageParsingFailed"));
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
|
-
async function
|
|
102
|
+
async function V(e, a) {
|
|
101
103
|
if (g.value++, typeof S == "function") {
|
|
102
104
|
S({
|
|
103
|
-
onProgress: (
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
onProgress: (n) => {
|
|
106
|
+
const t = o.value.find((s) => s.uid === e.uid);
|
|
107
|
+
t && (t.percent = n);
|
|
106
108
|
},
|
|
107
|
-
onError: (
|
|
108
|
-
|
|
109
|
-
const
|
|
109
|
+
onError: (n) => {
|
|
110
|
+
d.warning(n || r("ap.apUpload.networkAnomaly"));
|
|
111
|
+
const t = o.value.findIndex(
|
|
110
112
|
(s) => s.uid === e.uid
|
|
111
113
|
);
|
|
112
|
-
|
|
114
|
+
t > -1 && o.value.splice(t, 1), g.value--;
|
|
113
115
|
},
|
|
114
|
-
onSuccess: (
|
|
115
|
-
const
|
|
116
|
-
|
|
116
|
+
onSuccess: (n) => {
|
|
117
|
+
const t = o.value.find((s) => s.uid === e.uid);
|
|
118
|
+
t && (t.status = "success", t.path = n), c.value ? c.value.push(w(v, n, a.name)) : c.value = [w(v, n, a.name)], _.push({
|
|
117
119
|
uid: e.uid,
|
|
118
|
-
path:
|
|
120
|
+
path: n
|
|
119
121
|
}), g.value--;
|
|
120
122
|
},
|
|
121
123
|
file: a
|
|
@@ -123,117 +125,117 @@ const ue = ["accept"], re = { class: "picture-context" }, le = { class: "picture
|
|
|
123
125
|
return;
|
|
124
126
|
}
|
|
125
127
|
try {
|
|
126
|
-
const
|
|
127
|
-
e.oss =
|
|
128
|
+
const n = await D(b);
|
|
129
|
+
e.oss = n, o.value.push(e), E({
|
|
128
130
|
file: a,
|
|
129
|
-
dirName:
|
|
130
|
-
oss:
|
|
131
|
-
successCallBack(
|
|
132
|
-
const s =
|
|
133
|
-
s && (s.status = "success", s.path =
|
|
131
|
+
dirName: T,
|
|
132
|
+
oss: n,
|
|
133
|
+
successCallBack(t) {
|
|
134
|
+
const s = o.value.find((m) => m.uid === e.uid);
|
|
135
|
+
s && (s.status = "success", s.path = t), c.value ? c.value.push(w(v, t, a.name)) : c.value = [w(v, t, a.name)], _.push({
|
|
134
136
|
uid: e.uid,
|
|
135
|
-
path:
|
|
137
|
+
path: t
|
|
136
138
|
}), g.value--;
|
|
137
139
|
},
|
|
138
|
-
errorCallBack(
|
|
139
|
-
|
|
140
|
-
const s =
|
|
141
|
-
(
|
|
140
|
+
errorCallBack(t) {
|
|
141
|
+
d.warning(t || r("ap.apUpload.networkAnomaly"));
|
|
142
|
+
const s = o.value.findIndex(
|
|
143
|
+
(m) => m.uid === e.uid
|
|
142
144
|
);
|
|
143
|
-
s > -1 &&
|
|
145
|
+
s > -1 && o.value.splice(s, 1), g.value--;
|
|
144
146
|
},
|
|
145
|
-
progressCallBack(
|
|
146
|
-
const s =
|
|
147
|
-
s && (s.percent =
|
|
147
|
+
progressCallBack(t) {
|
|
148
|
+
const s = o.value.find((m) => m.uid === e.uid);
|
|
149
|
+
s && (s.percent = t);
|
|
148
150
|
}
|
|
149
151
|
});
|
|
150
|
-
} catch (
|
|
151
|
-
|
|
152
|
-
typeof (
|
|
152
|
+
} catch (n) {
|
|
153
|
+
d.warning(
|
|
154
|
+
typeof (n == null ? void 0 : n.message) == "string" ? n.message : r("ap.apUpload.networkAnomaly")
|
|
153
155
|
);
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
+
const t = o.value.findIndex((s) => s.uid === e.uid);
|
|
157
|
+
t > -1 && o.value.splice(t, 1), g.value--;
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
|
-
function
|
|
159
|
-
var
|
|
160
|
+
function j(e) {
|
|
161
|
+
var n;
|
|
160
162
|
if (e.path) {
|
|
161
163
|
if (Array.isArray(c.value)) {
|
|
162
|
-
const
|
|
164
|
+
const t = _.findIndex(
|
|
163
165
|
(s) => s.uid === e.uid
|
|
164
166
|
);
|
|
165
|
-
|
|
167
|
+
t >= 0 && (c == null || c.value.splice(t, 1), _.splice(t, 1)), c.value.length === 0 && (c.value = void 0);
|
|
166
168
|
}
|
|
167
169
|
} else
|
|
168
|
-
(
|
|
169
|
-
const a =
|
|
170
|
-
(
|
|
170
|
+
(n = e == null ? void 0 : e.oss) == null || n.pauseUpload();
|
|
171
|
+
const a = o.value.findIndex(
|
|
172
|
+
(t) => t.uid === e.uid
|
|
171
173
|
);
|
|
172
|
-
return
|
|
174
|
+
return o.value.splice(a, 1), Promise.resolve(!0);
|
|
173
175
|
}
|
|
174
176
|
return (e, a) => (f(), h("div", {
|
|
175
|
-
class:
|
|
176
|
-
[
|
|
177
|
-
[
|
|
177
|
+
class: Q({
|
|
178
|
+
[i(A)()]: !0,
|
|
179
|
+
[i(A)("admin")]: i(O) === "admin"
|
|
178
180
|
})
|
|
179
181
|
}, [
|
|
180
|
-
|
|
182
|
+
p("input", {
|
|
181
183
|
style: { display: "none" },
|
|
182
184
|
type: "file",
|
|
183
185
|
ref_key: "fileRef",
|
|
184
186
|
ref: x,
|
|
185
|
-
accept:
|
|
186
|
-
onChange:
|
|
187
|
-
}, null, 40,
|
|
188
|
-
|
|
189
|
-
(f(!0), h(
|
|
187
|
+
accept: i(y),
|
|
188
|
+
onChange: q
|
|
189
|
+
}, null, 40, re),
|
|
190
|
+
p("div", le, [
|
|
191
|
+
(f(!0), h(W, null, X(i(o), (n) => (f(), h("div", {
|
|
190
192
|
class: "picture-item",
|
|
191
|
-
key:
|
|
193
|
+
key: n.uid
|
|
192
194
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
src:
|
|
195
|
+
p("div", pe, [
|
|
196
|
+
p("img", {
|
|
197
|
+
src: n.thumbUrl,
|
|
196
198
|
alt: ""
|
|
197
|
-
}, null, 8,
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
}, null, 8, de),
|
|
200
|
+
Y(p("div", me, [
|
|
201
|
+
p("div", {
|
|
200
202
|
class: "picture-item-close",
|
|
201
|
-
onClick: (
|
|
203
|
+
onClick: (t) => j(n)
|
|
202
204
|
}, [
|
|
203
|
-
C(
|
|
204
|
-
], 8,
|
|
205
|
-
|
|
206
|
-
C(
|
|
207
|
-
percent:
|
|
205
|
+
C(i(te))
|
|
206
|
+
], 8, fe),
|
|
207
|
+
n.status === "uploading" ? (f(), h("div", he, [
|
|
208
|
+
C(i(ie), {
|
|
209
|
+
percent: n.percent,
|
|
208
210
|
strokeColor: "#ffffff",
|
|
209
211
|
trailColor: "rgba(255, 255, 255, 0.3)",
|
|
210
212
|
size: 4,
|
|
211
213
|
showInfo: !1
|
|
212
214
|
}, null, 8, ["percent"])
|
|
213
|
-
])) :
|
|
215
|
+
])) : $("", !0)
|
|
214
216
|
], 512), [
|
|
215
|
-
[
|
|
217
|
+
[Z, n.status === "uploading"]
|
|
216
218
|
])
|
|
217
219
|
])
|
|
218
220
|
]))), 128)),
|
|
219
|
-
|
|
221
|
+
i(l) === void 0 || i(o).length < i(l) ? (f(), h("div", {
|
|
220
222
|
key: 0,
|
|
221
223
|
class: "picture-upload",
|
|
222
|
-
onClick:
|
|
224
|
+
onClick: B
|
|
223
225
|
}, [
|
|
224
|
-
C(
|
|
225
|
-
|
|
226
|
-
])) :
|
|
226
|
+
C(i(ne)),
|
|
227
|
+
p("div", null, U(i(r)("ap.apUpload.update")), 1)
|
|
228
|
+
])) : $("", !0)
|
|
227
229
|
]),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
p("div", ge, [
|
|
231
|
+
i(N) ? (f(), h("div", ve, U(i(N)), 1)) : (f(), h("div", _e, U(`${i(r)("ap.apUpload.supportExtension")}:${i(oe)(i(y))},${i(r)(
|
|
230
232
|
"ap.apUpload.maxUploadPictureSize",
|
|
231
|
-
{ maxSize:
|
|
233
|
+
{ maxSize: i(k) }
|
|
232
234
|
)}`), 1))
|
|
233
235
|
])
|
|
234
236
|
], 2));
|
|
235
237
|
}
|
|
236
238
|
});
|
|
237
239
|
export {
|
|
238
|
-
|
|
240
|
+
ze as default
|
|
239
241
|
};
|
|
@@ -22,13 +22,16 @@ const ge = ["accept"], he = {
|
|
|
22
22
|
ee(
|
|
23
23
|
() => n == null ? void 0 : n.value,
|
|
24
24
|
function(e) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
if (o.value === null && e) {
|
|
26
|
+
const t = re(F, e);
|
|
27
|
+
l.value = 3, o.value = new File(
|
|
28
|
+
[e],
|
|
29
|
+
t,
|
|
30
|
+
{}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{ immediate: !0 }
|
|
32
35
|
);
|
|
33
36
|
const l = h(1), f = h(0), m = h(null), P = te(() => o.value && (n == null ? void 0 : n.value));
|
|
34
37
|
function H() {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { defineComponent as g, openBlock as
|
|
1
|
+
import { defineComponent as f, onMounted as g, openBlock as R, createElementBlock as V, normalizeClass as b, unref as t, createVNode as i, mergeProps as h } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { Form as
|
|
4
|
-
import { omit as
|
|
3
|
+
import { Form as I, InputNumber as B, RadioGroup as k } from "ant-design-vue";
|
|
4
|
+
import { omit as _ } from "lodash-unified";
|
|
5
5
|
import "./style.css";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
6
|
+
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const M = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApInputRadio",
|
|
9
|
-
inheritAttrs: !1,
|
|
10
9
|
__name: "ApInputRadio",
|
|
11
10
|
props: {
|
|
12
11
|
disabled: { type: Boolean },
|
|
@@ -28,38 +27,49 @@ const G = /* @__PURE__ */ g({
|
|
|
28
27
|
onFocus: {},
|
|
29
28
|
value: {},
|
|
30
29
|
options: {},
|
|
31
|
-
onInputRadioChange: {}
|
|
30
|
+
onInputRadioChange: {},
|
|
31
|
+
setRadioValCallback: {}
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:value", "InputRadioChange"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
let
|
|
37
|
-
|
|
34
|
+
setup(p, { emit: s }) {
|
|
35
|
+
const d = I.useInjectFormItemContext(), e = p, { b: m, e: c } = x("ap-input-radio"), u = s, n = (o) => {
|
|
36
|
+
let a = { ...e.value, ...o };
|
|
37
|
+
u("update:value", a), u("InputRadioChange", a), d.onFieldChange();
|
|
38
|
+
}, C = (o) => {
|
|
39
|
+
n({ inputVal: o });
|
|
38
40
|
}, v = (o) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
const a = o.target.value;
|
|
42
|
+
if (e.setRadioValCallback) {
|
|
43
|
+
let l = e.setRadioValCallback(a);
|
|
44
|
+
n({ inputVal: l, radioVal: a });
|
|
45
|
+
} else
|
|
46
|
+
n({ radioVal: a });
|
|
42
47
|
};
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
return g(() => {
|
|
49
|
+
if (e.setRadioValCallback) {
|
|
50
|
+
let o = e.setRadioValCallback(e.value.radioVal);
|
|
51
|
+
n({ inputVal: o });
|
|
52
|
+
}
|
|
53
|
+
}), (o, a) => {
|
|
54
|
+
var l, r;
|
|
55
|
+
return R(), V("div", {
|
|
56
|
+
class: b([t(m)()])
|
|
47
57
|
}, [
|
|
48
|
-
|
|
49
|
-
class: t(
|
|
50
|
-
}, t(
|
|
51
|
-
value: e.value ? (
|
|
52
|
-
onChange:
|
|
58
|
+
i(t(B), h({
|
|
59
|
+
class: t(c)("input-number")
|
|
60
|
+
}, t(_)(e, ["value", "options"]), {
|
|
61
|
+
value: e.value ? (l = e.value) == null ? void 0 : l.inputVal : "",
|
|
62
|
+
onChange: C
|
|
53
63
|
}), null, 16, ["class", "value"]),
|
|
54
|
-
|
|
55
|
-
value: e.value ? (
|
|
64
|
+
i(t(k), {
|
|
65
|
+
value: e.value ? (r = e.value) == null ? void 0 : r.radioVal : "",
|
|
56
66
|
options: e.options,
|
|
57
|
-
onChange:
|
|
67
|
+
onChange: v
|
|
58
68
|
}, null, 8, ["value", "options"])
|
|
59
69
|
], 2);
|
|
60
70
|
};
|
|
61
71
|
}
|
|
62
72
|
});
|
|
63
73
|
export {
|
|
64
|
-
|
|
74
|
+
M as default
|
|
65
75
|
};
|
|
@@ -2,7 +2,7 @@ import { InputNumberProps } from 'ant-design-vue/es/input-number';
|
|
|
2
2
|
type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
|
|
3
3
|
export type ApInputValType = {
|
|
4
4
|
value: {
|
|
5
|
-
|
|
5
|
+
inputVal: string | number;
|
|
6
6
|
radioVal: string | number;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -12,9 +12,10 @@ export type ApInputRadioOptions = Array<{
|
|
|
12
12
|
}>;
|
|
13
13
|
export type ApInputRadioProps = ApInputProps & ApInputValType & {
|
|
14
14
|
options: ApInputRadioOptions;
|
|
15
|
-
onInputRadioChange
|
|
16
|
-
|
|
15
|
+
onInputRadioChange?: (value: {
|
|
16
|
+
inputVal: string | number;
|
|
17
17
|
radioVal: string | number;
|
|
18
18
|
}) => void;
|
|
19
|
+
setRadioValCallback?: (radioVal: string | number) => string | number;
|
|
19
20
|
};
|
|
20
21
|
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { ApLadderProps, ApLadderSlots, ApLadderLabelValue } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
3
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
|
+
import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
|
|
5
|
+
import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
|
|
6
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
7
|
+
import { PresetColorType } from 'ant-design-vue/es/_util/colors';
|
|
8
|
+
import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
|
|
16
|
+
major: string;
|
|
17
|
+
minor: string;
|
|
18
|
+
majorColor: string;
|
|
19
|
+
minorColor: string;
|
|
20
|
+
layout: string;
|
|
21
|
+
tooltip: boolean;
|
|
22
|
+
labelValues: () => never[];
|
|
23
|
+
tooltipProps: () => {
|
|
24
|
+
title: undefined;
|
|
25
|
+
align: {};
|
|
26
|
+
arrowPointAtCenter: boolean;
|
|
27
|
+
arrow: boolean;
|
|
28
|
+
autoAdjustOverflow: boolean;
|
|
29
|
+
color: string;
|
|
30
|
+
destroyTooltipOnHide: boolean;
|
|
31
|
+
getPopupContainer: () => HTMLElement;
|
|
32
|
+
mouseEnterDelay: number;
|
|
33
|
+
mouseLeaveDelay: number;
|
|
34
|
+
overlayClassName: string;
|
|
35
|
+
overlayStyle: {};
|
|
36
|
+
overlayInnerStyle: {};
|
|
37
|
+
placement: string;
|
|
38
|
+
trigger: string;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
|
|
41
|
+
major: string;
|
|
42
|
+
minor: string;
|
|
43
|
+
majorColor: string;
|
|
44
|
+
minorColor: string;
|
|
45
|
+
layout: string;
|
|
46
|
+
tooltip: boolean;
|
|
47
|
+
labelValues: () => never[];
|
|
48
|
+
tooltipProps: () => {
|
|
49
|
+
title: undefined;
|
|
50
|
+
align: {};
|
|
51
|
+
arrowPointAtCenter: boolean;
|
|
52
|
+
arrow: boolean;
|
|
53
|
+
autoAdjustOverflow: boolean;
|
|
54
|
+
color: string;
|
|
55
|
+
destroyTooltipOnHide: boolean;
|
|
56
|
+
getPopupContainer: () => HTMLElement;
|
|
57
|
+
mouseEnterDelay: number;
|
|
58
|
+
mouseLeaveDelay: number;
|
|
59
|
+
overlayClassName: string;
|
|
60
|
+
overlayStyle: {};
|
|
61
|
+
overlayInnerStyle: {};
|
|
62
|
+
placement: string;
|
|
63
|
+
trigger: string;
|
|
64
|
+
};
|
|
65
|
+
}>>>, {
|
|
66
|
+
layout: "vertical" | "horizontal";
|
|
67
|
+
tooltip: boolean;
|
|
68
|
+
tooltipProps: Required<Pick<Partial< ExtractPropTypes<{
|
|
69
|
+
title: VueTypeValidableDef<any>;
|
|
70
|
+
trigger: PropType< TriggerType | TriggerType[]>;
|
|
71
|
+
open: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: any;
|
|
74
|
+
};
|
|
75
|
+
visible: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
placement: PropType<TooltipPlacement>;
|
|
80
|
+
color: PropType<LiteralUnion<PresetColorType>>;
|
|
81
|
+
transitionName: StringConstructor;
|
|
82
|
+
overlayStyle: {
|
|
83
|
+
type: PropType<CSSProperties>;
|
|
84
|
+
default: CSSProperties;
|
|
85
|
+
};
|
|
86
|
+
overlayInnerStyle: {
|
|
87
|
+
type: PropType<CSSProperties>;
|
|
88
|
+
default: CSSProperties;
|
|
89
|
+
};
|
|
90
|
+
overlayClassName: StringConstructor;
|
|
91
|
+
openClassName: StringConstructor;
|
|
92
|
+
prefixCls: StringConstructor;
|
|
93
|
+
mouseEnterDelay: NumberConstructor;
|
|
94
|
+
mouseLeaveDelay: NumberConstructor;
|
|
95
|
+
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
96
|
+
arrowPointAtCenter: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: any;
|
|
99
|
+
};
|
|
100
|
+
arrow: {
|
|
101
|
+
type: PropType<boolean | {
|
|
102
|
+
pointAtCenter?: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
default: boolean | {
|
|
105
|
+
pointAtCenter?: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
autoAdjustOverflow: {
|
|
109
|
+
type: PropType<boolean | AdjustOverflow>;
|
|
110
|
+
default: boolean | AdjustOverflow;
|
|
111
|
+
};
|
|
112
|
+
destroyTooltipOnHide: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: any;
|
|
115
|
+
};
|
|
116
|
+
align: {
|
|
117
|
+
type: PropType<AlignType>;
|
|
118
|
+
default: AlignType;
|
|
119
|
+
};
|
|
120
|
+
builtinPlacements: {
|
|
121
|
+
type: PropType<BuildInPlacements>;
|
|
122
|
+
default: BuildInPlacements;
|
|
123
|
+
};
|
|
124
|
+
children: ArrayConstructor;
|
|
125
|
+
onVisibleChange: PropType<(vis: boolean) => void>;
|
|
126
|
+
'onUpdate:visible': PropType<(vis: boolean) => void>;
|
|
127
|
+
onOpenChange: PropType<(vis: boolean) => void>;
|
|
128
|
+
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
129
|
+
}>>, "title" | "placement" | "color" | "mouseEnterDelay" | "getPopupContainer" | "trigger" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide" | "align">>;
|
|
130
|
+
major: string;
|
|
131
|
+
minor: string;
|
|
132
|
+
majorColor: string;
|
|
133
|
+
minorColor: string;
|
|
134
|
+
labelValues: Array< ApLadderLabelValue>;
|
|
135
|
+
}, {}>;
|
|
136
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
137
|
+
export default _default;
|
|
138
|
+
type __VLS_WithDefaults<P, D> = {
|
|
139
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
140
|
+
default: D[K];
|
|
141
|
+
}> : P[K];
|
|
142
|
+
};
|
|
143
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
144
|
+
type __VLS_TypePropsToOption<T> = {
|
|
145
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
146
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
147
|
+
} : {
|
|
148
|
+
type: PropType<T[K]>;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
153
|
+
new (): {
|
|
154
|
+
$slots: S;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
type __VLS_PrettifyLocal<T> = {
|
|
158
|
+
[K in keyof T]: T[K];
|
|
159
|
+
} & {};
|