@aplus-frontend/ui 0.0.28 → 0.0.29
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-download/hooks/index.mjs +4 -3
- package/es/src/ap-download/interface.d.ts +2 -2
- package/es/src/ap-field/date/helper.mjs +5 -5
- package/es/src/ap-field/date-range/index.vue.mjs +15 -15
- package/es/src/ap-form/ap-form-list.vue.mjs +29 -21
- package/es/src/ap-form/ap-form.vue2.mjs +77 -77
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/search-form/index.vue.mjs +123 -99
- package/es/src/ap-table/hooks/use-table-paging.mjs +23 -21
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -11
- package/es/src/ap-upload/apUpload.vue.mjs +42 -36
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +115 -102
- package/es/src/ap-upload/components/Picture.vue2.mjs +121 -111
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +120 -109
- package/es/src/ap-upload/hooks/useOss.d.ts +9 -4
- package/es/src/ap-upload/hooks/useOss.mjs +52 -34
- package/es/src/ap-upload/utils/accept.d.ts +3 -0
- package/es/src/ap-upload/utils/accept.mjs +35 -30
- package/es/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
- package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +7 -6
- package/es/src/business/ap-status/interface.d.ts +4 -1
- package/es/src/business/index.d.ts +41 -8
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +9 -8
- package/es/src/config-provider/constants.d.ts +10 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/locale/lang/en.mjs +24 -0
- package/es/src/locale/lang/zh-cn.mjs +24 -0
- package/es/src/work-order-modal/createWorkOrder.d.ts +3 -1
- package/es/src/work-order-modal/interfaces.d.ts +3 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +7 -7
- package/lib/src/ap-download/hooks/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +2 -2
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -11
- package/lib/src/ap-upload/apUpload.vue.js +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/ap-upload/hooks/useOss.d.ts +9 -4
- package/lib/src/ap-upload/hooks/useOss.js +1 -1
- package/lib/src/ap-upload/utils/accept.d.ts +3 -0
- package/lib/src/ap-upload/utils/accept.js +1 -1
- package/lib/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
- package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-status/interface.d.ts +4 -1
- package/lib/src/business/index.d.ts +41 -8
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +10 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/work-order-modal/createWorkOrder.d.ts +3 -1
- package/lib/src/work-order-modal/interfaces.d.ts +3 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Flex as
|
|
1
|
+
import { isVNode as ee, defineComponent as te, useSlots as ae, ref as oe, unref as t, shallowRef as j, computed as C, watch as I, cloneVNode as le, createVNode as l, Fragment as S, openBlock as c, createBlock as h, mergeProps as ne, withCtx as R, resolveDynamicComponent as F, createElementBlock as re, renderList as se } from "vue";
|
|
2
|
+
import { Col as B, Flex as D, Space as ue, Button as b, Row as pe } from "ant-design-vue";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
|
-
import "../ap-form-item-group/index.vue2.mjs";
|
|
5
4
|
import "../ap-form-item.vue2.mjs";
|
|
6
5
|
import "../../hooks/index.mjs";
|
|
7
|
-
import { genRealChildren as
|
|
8
|
-
import { DoubleRightOutlined as
|
|
6
|
+
import { genRealChildren as O } from "../ap-form-item-group/helper.mjs";
|
|
7
|
+
import { DoubleRightOutlined as ie } from "@ant-design/icons-vue";
|
|
9
8
|
import "../../config-provider/index.mjs";
|
|
10
9
|
import "../style/search-form.css";
|
|
11
|
-
import { omit as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
function
|
|
19
|
-
return typeof
|
|
10
|
+
import { isArray as ce, omit as de } from "lodash-unified";
|
|
11
|
+
import { isDef as fe } from "../../utils/index.mjs";
|
|
12
|
+
import { useControllableValue as me } from "../../hooks/useControllableValue.mjs";
|
|
13
|
+
import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useLocale as xe } from "../../config-provider/hooks/use-locale.mjs";
|
|
15
|
+
import L from "../ap-form-item.vue.mjs";
|
|
16
|
+
import Ce from "../ap-form.vue2.mjs";
|
|
17
|
+
function ge(d) {
|
|
18
|
+
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !ee(d);
|
|
20
19
|
}
|
|
21
|
-
const
|
|
20
|
+
const p = 24, Ie = /* @__PURE__ */ te({
|
|
22
21
|
name: "ApFormSearchForm",
|
|
23
22
|
__name: "index",
|
|
24
23
|
props: {
|
|
@@ -97,113 +96,138 @@ const s = 24, Pe = /* @__PURE__ */ K({
|
|
|
97
96
|
}
|
|
98
97
|
},
|
|
99
98
|
emits: ["update:collapse"],
|
|
100
|
-
setup(
|
|
101
|
-
expose:
|
|
102
|
-
emit:
|
|
99
|
+
setup(d, {
|
|
100
|
+
expose: M,
|
|
101
|
+
emit: $
|
|
103
102
|
}) {
|
|
104
|
-
var
|
|
105
|
-
const
|
|
106
|
-
value:
|
|
107
|
-
updateValue:
|
|
108
|
-
} =
|
|
103
|
+
var N;
|
|
104
|
+
const r = ae(), a = d, q = $, {
|
|
105
|
+
value: f,
|
|
106
|
+
updateValue: z
|
|
107
|
+
} = me(a, q, {
|
|
109
108
|
valuePropName: "collapse",
|
|
110
109
|
defaultValuePropName: "defaultCollapse"
|
|
111
110
|
}), {
|
|
112
|
-
b:
|
|
113
|
-
} =
|
|
114
|
-
t:
|
|
115
|
-
} =
|
|
116
|
-
function
|
|
117
|
-
|
|
111
|
+
b: U
|
|
112
|
+
} = he("ap-form-search-form"), {
|
|
113
|
+
t: v
|
|
114
|
+
} = xe(), x = oe();
|
|
115
|
+
function W() {
|
|
116
|
+
z(!t(f));
|
|
118
117
|
}
|
|
119
|
-
function
|
|
120
|
-
var e,
|
|
121
|
-
(
|
|
118
|
+
function G() {
|
|
119
|
+
var e, o;
|
|
120
|
+
(o = (e = x.value) == null ? void 0 : e.validateFields()) == null || o.then(a.onSubmit);
|
|
122
121
|
}
|
|
123
|
-
function
|
|
124
|
-
var e,
|
|
125
|
-
|
|
122
|
+
function H() {
|
|
123
|
+
var e, o, n;
|
|
124
|
+
a.customReset || (o = (e = x.value) == null ? void 0 : e.resetFields) == null || o.call(e), (n = a.onReset) == null || n.call(a);
|
|
126
125
|
}
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}),
|
|
126
|
+
const w = j(O(r.default())), m = j((N = r.extra) == null ? void 0 : N.call(r)), E = C(() => Math.floor(p / a.countPerRow));
|
|
127
|
+
I(() => r.default(), (e) => {
|
|
128
|
+
w.value = O(e);
|
|
129
|
+
}), I(() => {
|
|
131
130
|
var e;
|
|
132
|
-
return (e =
|
|
131
|
+
return (e = r.extra) == null ? void 0 : e.call(r);
|
|
133
132
|
}, (e) => {
|
|
134
|
-
|
|
133
|
+
m.value = e;
|
|
135
134
|
});
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
c != null && c.hidden ? f.push(p) : (h += c.span || r, b.push(p));
|
|
135
|
+
const J = (e) => fe(e) ? (ce(e) ? e : [e]).join("") : Date.now(), g = C(() => {
|
|
136
|
+
const e = [...t(w)], o = [], n = [], s = t(E);
|
|
137
|
+
let y = 0;
|
|
138
|
+
e.forEach((u) => {
|
|
139
|
+
const i = u.props;
|
|
140
|
+
i != null && i.hidden ? o.push(u) : (y += i.span || s, n.push(u));
|
|
143
141
|
});
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
142
|
+
const k = p - (y + s) % p, Q = k < s ? p : k, A = p - s * (t(m) && !a.extraInAction ? 2 : 1), X = !a.forceExpand && y > A;
|
|
143
|
+
let P = 0, T = 0;
|
|
144
|
+
const Y = n.map((u, i) => {
|
|
145
|
+
const _ = u.props, V = _.span || s;
|
|
146
|
+
if (P += V, !a.forceExpand && t(f) && P > A) {
|
|
147
|
+
o.push(le(u, {
|
|
148
|
+
hidden: !0
|
|
149
|
+
}));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
return T += V, {
|
|
153
|
+
node: u,
|
|
154
|
+
span: _.span || s,
|
|
155
|
+
key: `ApFormSearchFormItem-${i}-${J(_.name)}`
|
|
156
|
+
};
|
|
157
|
+
}).filter(Boolean), Z = p - T - s;
|
|
158
|
+
return {
|
|
159
|
+
hideNode: l(S, null, [o]),
|
|
160
|
+
nodes: Y,
|
|
161
|
+
defaultExtraSpan: Q,
|
|
162
|
+
actualExtraSpan: Z,
|
|
163
|
+
showCollapse: X
|
|
164
|
+
};
|
|
165
|
+
}), K = C(() => {
|
|
166
|
+
let e;
|
|
167
|
+
const o = t(g);
|
|
168
|
+
return l(S, null, [l(B, {
|
|
169
|
+
span: t(t(E))
|
|
156
170
|
}, {
|
|
157
|
-
default: () => [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
default: () => [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
default: () => [l(L, null, {
|
|
172
|
+
default: () => [l(D, {
|
|
173
|
+
justify: "space-between"
|
|
174
|
+
}, {
|
|
175
|
+
default: () => [l(ue, null, {
|
|
176
|
+
default: () => [l(b, {
|
|
177
|
+
type: "primary",
|
|
178
|
+
onClick: G,
|
|
179
|
+
loading: a.submitLoading
|
|
180
|
+
}, {
|
|
181
|
+
default: () => [a.searchText || v("ap.apForm.search.search")]
|
|
182
|
+
}), l(b, {
|
|
183
|
+
onClick: H
|
|
184
|
+
}, {
|
|
185
|
+
default: () => [a.resetText || v("ap.apForm.search.reset")]
|
|
186
|
+
}), o.showCollapse ? l(b, {
|
|
187
|
+
onClick: W,
|
|
188
|
+
icon: l(ie, {
|
|
189
|
+
style: "color:#B8C3D1",
|
|
190
|
+
rotate: t(f) ? 90 : -90
|
|
191
|
+
}, null)
|
|
192
|
+
}, null) : null]
|
|
193
|
+
}), a.extraInAction ? t(m) : null]
|
|
194
|
+
})]
|
|
179
195
|
})]
|
|
180
|
-
}), !
|
|
181
|
-
span:
|
|
196
|
+
}), !a.extraInAction && t(m) ? l(B, {
|
|
197
|
+
span: t(f) ? o.actualExtraSpan : o.defaultExtraSpan
|
|
182
198
|
}, {
|
|
183
|
-
default: () => [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
default: () => [l(L, null, {
|
|
200
|
+
default: () => [l(D, {
|
|
201
|
+
justify: !t(f) && o.defaultExtraSpan === p ? "start" : "end"
|
|
202
|
+
}, ge(e = t(m)) ? e : {
|
|
203
|
+
default: () => [e]
|
|
204
|
+
})]
|
|
187
205
|
})]
|
|
188
206
|
}) : null]);
|
|
189
207
|
});
|
|
190
|
-
return
|
|
191
|
-
apForm: C(() =>
|
|
192
|
-
}), (e,
|
|
193
|
-
class:
|
|
208
|
+
return M({
|
|
209
|
+
apForm: C(() => t(x))
|
|
210
|
+
}), (e, o) => (c(), h(Ce, ne({
|
|
211
|
+
class: t(U)(),
|
|
194
212
|
ref_key: "apForm",
|
|
195
|
-
ref:
|
|
196
|
-
},
|
|
197
|
-
default:
|
|
198
|
-
|
|
213
|
+
ref: x
|
|
214
|
+
}, t(de)(a, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
215
|
+
default: R(() => [(c(), h(F(g.value.hideNode))), l(t(pe), {
|
|
216
|
+
gutter: 16
|
|
199
217
|
}, {
|
|
200
|
-
default:
|
|
218
|
+
default: R(() => [(c(!0), re(S, null, se(g.value.nodes, (n) => (c(), h(t(B), {
|
|
219
|
+
key: n.key,
|
|
220
|
+
span: n.span
|
|
221
|
+
}, {
|
|
222
|
+
default: R(() => [(c(), h(F(n.node)))]),
|
|
223
|
+
_: 2
|
|
224
|
+
}, 1032, ["span"]))), 128)), (c(), h(F(K.value)))]),
|
|
201
225
|
_: 1
|
|
202
|
-
}
|
|
226
|
+
})]),
|
|
203
227
|
_: 1
|
|
204
228
|
}, 16, ["class"]));
|
|
205
229
|
}
|
|
206
230
|
});
|
|
207
231
|
export {
|
|
208
|
-
|
|
232
|
+
Ie as default
|
|
209
233
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as v, unref as r, onMounted as
|
|
2
|
-
import { parseFieldValue as
|
|
3
|
-
import { isArray as
|
|
1
|
+
import { ref as v, nextTick as N, unref as r, onMounted as U, computed as $ } from "vue";
|
|
2
|
+
import { parseFieldValue as W, dataIndexToStr as X } from "../utils.mjs";
|
|
3
|
+
import { isArray as Y } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { useLocale as
|
|
6
|
-
const
|
|
7
|
-
manual:
|
|
5
|
+
import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
const oe = ({
|
|
7
|
+
manual: j = !1,
|
|
8
8
|
defaultCurrent: y = 1,
|
|
9
9
|
defaultPageSize: S = 10,
|
|
10
10
|
request: D,
|
|
@@ -17,7 +17,7 @@ const ae = ({
|
|
|
17
17
|
sortFields: E = []
|
|
18
18
|
}) => {
|
|
19
19
|
let F = 0, f = {};
|
|
20
|
-
const L = (e) => T ? T(e) : e, l = v(), i = v(y), g = v(S), { t: V } =
|
|
20
|
+
const L = (e) => T ? T(e) : e, l = v(), i = v(y), g = v(S), { t: V } = Z(), n = v({
|
|
21
21
|
total: 0,
|
|
22
22
|
records: A,
|
|
23
23
|
loading: !1
|
|
@@ -41,15 +41,17 @@ const ae = ({
|
|
|
41
41
|
return Object.entries(e).forEach(([t, o]) => {
|
|
42
42
|
if (a[t] = o, z && o) {
|
|
43
43
|
const s = z[t];
|
|
44
|
-
s && (a[t] =
|
|
44
|
+
s && (a[t] = W(s, o));
|
|
45
45
|
}
|
|
46
46
|
}), a;
|
|
47
47
|
}, M = (e) => {
|
|
48
48
|
var o, s, d, p, m, u, c;
|
|
49
49
|
const a = ((s = (o = l.value) == null ? void 0 : o.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
|
|
50
|
-
Object.entries(a).forEach(([
|
|
51
|
-
P && P.indexOf(
|
|
52
|
-
}), (p = (d = l.value) == null ? void 0 : d.apForm) == null || p.resetFields(), (c = (u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || c.call(u, t),
|
|
50
|
+
Object.entries(a).forEach(([O, K]) => {
|
|
51
|
+
P && P.indexOf(O) > -1 && (t[O] = K);
|
|
52
|
+
}), (p = (d = l.value) == null ? void 0 : d.apForm) == null || p.resetFields(), (c = (u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || c.call(u, t), N(() => {
|
|
53
|
+
e == null || e();
|
|
54
|
+
});
|
|
53
55
|
}, h = (e) => {
|
|
54
56
|
f = e;
|
|
55
57
|
const a = w(e);
|
|
@@ -76,13 +78,13 @@ const ae = ({
|
|
|
76
78
|
q({
|
|
77
79
|
current: o > 0 ? o : 1
|
|
78
80
|
});
|
|
79
|
-
},
|
|
81
|
+
}, x = (e, a, t) => {
|
|
80
82
|
var m, u;
|
|
81
83
|
const o = ((u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
|
|
82
84
|
i.value = e.current, g.value = e.pageSize;
|
|
83
|
-
const s =
|
|
85
|
+
const s = Y(t) ? [...t] : [t], d = {};
|
|
84
86
|
for (const c of s)
|
|
85
|
-
E.includes(c.field) && (d[
|
|
87
|
+
E.includes(c.field) && (d[X(c.field)] = c.order);
|
|
86
88
|
const p = {};
|
|
87
89
|
for (const c of Object.keys(a))
|
|
88
90
|
B.includes(c) && (p[c] = a[c]);
|
|
@@ -94,21 +96,21 @@ const ae = ({
|
|
|
94
96
|
pageSize: e.pageSize
|
|
95
97
|
});
|
|
96
98
|
};
|
|
97
|
-
|
|
99
|
+
U(() => {
|
|
98
100
|
var a, t;
|
|
99
101
|
const e = ((t = (a = l.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
|
|
100
102
|
if (f = {
|
|
101
103
|
current: r(i),
|
|
102
104
|
pageSize: r(g),
|
|
103
105
|
...e
|
|
104
|
-
}, !
|
|
106
|
+
}, !j) {
|
|
105
107
|
const o = w(f);
|
|
106
108
|
b(o);
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
|
-
const H =
|
|
111
|
+
const H = $(() => r(n).total === 0 ? "-" : `${r(i.value)}/${Math.ceil(
|
|
110
112
|
r(n).total / r(g)
|
|
111
|
-
)}`), I =
|
|
113
|
+
)}`), I = $(() => ({
|
|
112
114
|
loading: r(n).loading,
|
|
113
115
|
pagination: {
|
|
114
116
|
current: r(i),
|
|
@@ -121,7 +123,7 @@ const ae = ({
|
|
|
121
123
|
{ page: r(H) }
|
|
122
124
|
)}`
|
|
123
125
|
},
|
|
124
|
-
onChange:
|
|
126
|
+
onChange: x,
|
|
125
127
|
dataSource: r(n).records
|
|
126
128
|
}));
|
|
127
129
|
return {
|
|
@@ -133,10 +135,10 @@ const ae = ({
|
|
|
133
135
|
data: n,
|
|
134
136
|
current: i,
|
|
135
137
|
pageSize: g,
|
|
136
|
-
handleTableChange:
|
|
138
|
+
handleTableChange: x,
|
|
137
139
|
tableProps: I
|
|
138
140
|
};
|
|
139
141
|
};
|
|
140
142
|
export {
|
|
141
|
-
|
|
143
|
+
oe as useTablePaging
|
|
142
144
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PropType, VNode, DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes, RendererNode, RendererElement } from 'vue';
|
|
2
2
|
import { FileUploadType, BeforeUpload, CustomRequest } from './apUploadTypes';
|
|
3
|
+
import { accessCreate } from '@aplus-frontend/oss';
|
|
3
4
|
|
|
4
5
|
declare function clear(): void;
|
|
5
6
|
declare const _default: DefineComponent<{
|
|
6
7
|
dirName: {
|
|
7
8
|
type: StringConstructor;
|
|
8
|
-
default: string;
|
|
9
9
|
};
|
|
10
10
|
type: {
|
|
11
11
|
type: PropType<FileUploadType>;
|
|
@@ -17,11 +17,9 @@ declare const _default: DefineComponent<{
|
|
|
17
17
|
};
|
|
18
18
|
needName: {
|
|
19
19
|
type: (BooleanConstructor | ObjectConstructor)[];
|
|
20
|
-
default: boolean;
|
|
21
20
|
};
|
|
22
21
|
accept: {
|
|
23
22
|
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
23
|
};
|
|
26
24
|
maxSize: {
|
|
27
25
|
type: NumberConstructor;
|
|
@@ -44,7 +42,7 @@ declare const _default: DefineComponent<{
|
|
|
44
42
|
type: PropType<CustomRequest>;
|
|
45
43
|
};
|
|
46
44
|
getOssAccess: {
|
|
47
|
-
type:
|
|
45
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
48
46
|
};
|
|
49
47
|
}, {
|
|
50
48
|
done: ComputedRef<boolean>;
|
|
@@ -54,7 +52,6 @@ declare const _default: DefineComponent<{
|
|
|
54
52
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
55
53
|
dirName: {
|
|
56
54
|
type: StringConstructor;
|
|
57
|
-
default: string;
|
|
58
55
|
};
|
|
59
56
|
type: {
|
|
60
57
|
type: PropType<FileUploadType>;
|
|
@@ -66,11 +63,9 @@ declare const _default: DefineComponent<{
|
|
|
66
63
|
};
|
|
67
64
|
needName: {
|
|
68
65
|
type: (BooleanConstructor | ObjectConstructor)[];
|
|
69
|
-
default: boolean;
|
|
70
66
|
};
|
|
71
67
|
accept: {
|
|
72
68
|
type: StringConstructor;
|
|
73
|
-
default: string;
|
|
74
69
|
};
|
|
75
70
|
maxSize: {
|
|
76
71
|
type: NumberConstructor;
|
|
@@ -93,7 +88,7 @@ declare const _default: DefineComponent<{
|
|
|
93
88
|
type: PropType<CustomRequest>;
|
|
94
89
|
};
|
|
95
90
|
getOssAccess: {
|
|
96
|
-
type:
|
|
91
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
97
92
|
};
|
|
98
93
|
}>> & {
|
|
99
94
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -101,11 +96,8 @@ declare const _default: DefineComponent<{
|
|
|
101
96
|
type: FileUploadType;
|
|
102
97
|
title: string;
|
|
103
98
|
value: string | unknown[] | Record<string, any>;
|
|
104
|
-
accept: string;
|
|
105
|
-
dirName: string;
|
|
106
99
|
subTitle: string | VNode< RendererNode, RendererElement, {
|
|
107
100
|
[key: string]: any;
|
|
108
101
|
}>;
|
|
109
|
-
needName: boolean | Record<string, any>;
|
|
110
102
|
}, {}>;
|
|
111
103
|
export default _default;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as F, computed as c, provide as e, ref as u, openBlock as d, createElementBlock as U, normalizeClass as T, unref as j, createBlock as z, resolveDynamicComponent as h, normalizeProps as k, mergeProps as B, createCommentVNode as $ } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
6
|
import "./styles/upload.css";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
7
|
+
import { injectLocaleToAccept as q } from "./utils/accept.mjs";
|
|
8
|
+
import { injectLocaleToOss as L } from "./hooks/useOss.mjs";
|
|
9
|
+
import { useLocale as R } from "../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useNamespace as M } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import P from "./components/SingleFile.vue2.mjs";
|
|
12
|
+
import w from "./components/MultipleFile.vue2.mjs";
|
|
13
|
+
import D from "./components/Picture.vue2.mjs";
|
|
14
|
+
import { useGlobalConfig as f } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
const ae = /* @__PURE__ */ F({
|
|
13
16
|
name: "AplusFileUpload",
|
|
14
17
|
__name: "apUpload",
|
|
15
18
|
props: {
|
|
16
19
|
dirName: {
|
|
17
|
-
type: String
|
|
18
|
-
default: "FileDemo"
|
|
20
|
+
type: String
|
|
19
21
|
},
|
|
20
22
|
type: {
|
|
21
23
|
type: String,
|
|
@@ -26,12 +28,10 @@ const H = /* @__PURE__ */ b({
|
|
|
26
28
|
default: void 0
|
|
27
29
|
},
|
|
28
30
|
needName: {
|
|
29
|
-
type: [Boolean, Object]
|
|
30
|
-
default: !1
|
|
31
|
+
type: [Boolean, Object]
|
|
31
32
|
},
|
|
32
33
|
accept: {
|
|
33
|
-
type: String
|
|
34
|
-
default: ""
|
|
34
|
+
type: String
|
|
35
35
|
},
|
|
36
36
|
maxSize: {
|
|
37
37
|
type: Number
|
|
@@ -58,38 +58,44 @@ const H = /* @__PURE__ */ b({
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
emits: ["update:value"],
|
|
61
|
-
setup(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
setup(g, { expose: v, emit: y }) {
|
|
62
|
+
var r, i, m, l;
|
|
63
|
+
const { t: s, lang: b } = R();
|
|
64
|
+
q(s), L(s, b);
|
|
65
|
+
const { b: N } = M("ap-upload"), t = g, C = y, _ = {
|
|
66
|
+
singleFile: P,
|
|
67
|
+
multipleFile: w,
|
|
68
|
+
picture: D
|
|
69
|
+
}, S = c({
|
|
67
70
|
get() {
|
|
68
71
|
return t.value;
|
|
69
72
|
},
|
|
70
|
-
set(
|
|
71
|
-
|
|
73
|
+
set(n) {
|
|
74
|
+
C("update:value", n);
|
|
72
75
|
}
|
|
73
|
-
}),
|
|
74
|
-
e("theme",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
}), x = f("uiMode"), o = f("apUpload");
|
|
77
|
+
e("theme", x.value), e("value", S), e("dirName", t.dirName ?? ((r = o.value) == null ? void 0 : r.dirName)), e("needName", t.needName ?? ((i = o.value) == null ? void 0 : i.needName) ?? !1), e("accept", t.accept ?? ((m = o.value) == null ? void 0 : m.accept) ?? ""), e("maxSize", t.maxSize), e("title", t.title), e("subTitle", t.subTitle), e("maxCount", t.maxCount), e("beforeUpload", t.beforeUpload), e("customRequest", t.customRequest), e(
|
|
78
|
+
"getOssAccess",
|
|
79
|
+
t.getOssAccess ?? ((l = o.value) == null ? void 0 : l.getOssAccess)
|
|
80
|
+
);
|
|
81
|
+
const O = c(() => p.value === 0), p = u(0);
|
|
82
|
+
e("uploadingCount", p);
|
|
83
|
+
const a = u(!0);
|
|
84
|
+
function A() {
|
|
85
|
+
a.value = !1, setTimeout(() => {
|
|
86
|
+
a.value = !0;
|
|
81
87
|
});
|
|
82
88
|
}
|
|
83
|
-
return
|
|
84
|
-
done:
|
|
85
|
-
clear:
|
|
86
|
-
}), (
|
|
87
|
-
class:
|
|
89
|
+
return v({
|
|
90
|
+
done: O,
|
|
91
|
+
clear: A
|
|
92
|
+
}), (n, E) => (d(), U("div", {
|
|
93
|
+
class: T(j(N)())
|
|
88
94
|
}, [
|
|
89
|
-
|
|
95
|
+
a.value ? (d(), z(h(_[t.type]), k(B({ key: 0 }, n.$attrs)), null, 16)) : $("", !0)
|
|
90
96
|
], 2));
|
|
91
97
|
}
|
|
92
98
|
});
|
|
93
99
|
export {
|
|
94
|
-
|
|
100
|
+
ae as default
|
|
95
101
|
};
|