@aplus-frontend/ui 0.4.14 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-table/ap-table.vue2.mjs +206 -181
- package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
- package/es/src/ap-upload/apUpload.vue.mjs +22 -18
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +66 -66
- package/es/src/ap-upload/components/Picture.vue2.mjs +82 -82
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +114 -114
- package/es/src/config-provider/config-provider.d.ts +3 -0
- package/es/src/config-provider/css-var.d.ts +3 -0
- package/es/src/config-provider/css-var.mjs +21 -14
- package/es/src/config-provider/index.d.ts +15 -0
- package/es/src/scroll-bar/index.vue.d.ts +1 -0
- package/es/src/scroll-bar/index.vue.mjs +31 -30
- package/es/src/scroll-bar/interface.d.ts +3 -1
- package/es/src/theme/antd-global-overwrite/admin/index.css +24 -2
- package/es/src/theme/antd-global-overwrite/admin/table.css +24 -2
- package/es/src/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/es/src/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +40 -30
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
- 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/config-provider/config-provider.d.ts +3 -0
- package/lib/src/config-provider/css-var.d.ts +3 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +15 -0
- package/lib/src/scroll-bar/index.vue.d.ts +1 -0
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/interface.d.ts +3 -1
- package/lib/src/theme/antd-global-overwrite/admin/index.css +24 -2
- package/lib/src/theme/antd-global-overwrite/admin/table.css +24 -2
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/package.json +1 -1
- package/theme/antd-global-overwrite/admin/index.css +24 -2
- package/theme/antd-global-overwrite/admin/table.css +24 -2
- package/theme/antd-global-overwrite/admin/table.less +8 -2
- package/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/theme/antd-global-overwrite/aplus/table.less +7 -2
- package/theme/ap-table/ap-table.css +7 -0
- package/theme/ap-table/ap-table.less +10 -8
- package/theme/ap-table-modal/index.css +7 -0
- package/theme/index.css +7 -0
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { defineComponent as ze, useSlots as Pe, ref as f, computed as s, unref as r, createVNode as m, Fragment as J, watchEffect as Ne, watch as I, openBlock as y, createElementBlock as x, normalizeClass as g, normalizeStyle as Q, mergeProps as S, createSlots as X, withCtx as w, renderList as Y, createBlock as Z, resolveDynamicComponent as Ie, renderSlot as R, createCommentVNode as ee, createElementVNode as E, normalizeProps as Ee, guardReactiveProps as Ke } from "vue";
|
|
2
|
+
import { Divider as Oe, Table as Le } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Ve } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as Ae } from "../ap-form/index.mjs";
|
|
5
|
+
import { noRenderAsFormItemValueList as oe } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as
|
|
9
|
-
import { getColumnOrder as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { isDef as
|
|
7
|
+
import { useTablePaging as De } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as b, omit as ae, isBoolean as $e } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as re, updateFormProps as je, getFieldProps as We, getSearchFormItemRenderNode as He, recursionApColumns as te, apColumnToColumn as _e, getTableTitle as qe, getTableRenderType as Ue, getTableRenderProps as Ge, getTableCellRenderNode as Me, falseToUndefined as Je } from "./utils.mjs";
|
|
10
|
+
import Qe from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import Xe from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { getScrollbarSize as Ye, isDef as Ze } from "../utils/index.mjs";
|
|
13
13
|
import "./components/setting/modal/index.vue.mjs";
|
|
14
14
|
import "./components/paragraph-ellipsis/index.vue.mjs";
|
|
15
|
-
import { useProvideApTable as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
15
|
+
import { useProvideApTable as eo } from "./context.mjs";
|
|
16
|
+
import "../scroll-bar/index.mjs";
|
|
17
|
+
import { useNamespace as oo } from "../config-provider/hooks/use-namespace.mjs";
|
|
18
|
+
import { useGlobalConfig as ao } from "../config-provider/hooks/use-global-config.mjs";
|
|
19
|
+
import ro from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
20
|
+
import to from "./components/setting/modal/index.vue2.mjs";
|
|
21
|
+
import lo from "../scroll-bar/index.vue.mjs";
|
|
22
|
+
const ko = /* @__PURE__ */ ze({
|
|
21
23
|
name: "ApTable",
|
|
22
24
|
__name: "ap-table",
|
|
23
25
|
props: {
|
|
@@ -141,175 +143,179 @@ const bo = /* @__PURE__ */ Te({
|
|
|
141
143
|
default: void 0
|
|
142
144
|
}
|
|
143
145
|
},
|
|
144
|
-
setup(
|
|
145
|
-
expose:
|
|
146
|
+
setup(le, {
|
|
147
|
+
expose: ne
|
|
146
148
|
}) {
|
|
147
|
-
const o =
|
|
148
|
-
let
|
|
149
|
-
const
|
|
150
|
-
e:
|
|
149
|
+
const o = le;
|
|
150
|
+
let K = 0;
|
|
151
|
+
const se = Ye(), v = Pe(), [, de] = Ve(), {
|
|
152
|
+
e: B,
|
|
151
153
|
b: i,
|
|
152
|
-
be:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
be: O,
|
|
155
|
+
bm: ue
|
|
156
|
+
} = oo("ap-table"), L = ao("valueTypeMap"), {
|
|
157
|
+
height: ie,
|
|
158
|
+
contentRef: ce
|
|
159
|
+
} = Qe(), k = f(o.size), u = f([]), V = f([]), A = f(), D = f(), $ = f();
|
|
160
|
+
eo({
|
|
158
161
|
columns: s(() => u.value),
|
|
159
|
-
columnsBackup: s(() =>
|
|
160
|
-
size: s(() =>
|
|
162
|
+
columnsBackup: s(() => V.value),
|
|
163
|
+
size: s(() => k.value),
|
|
161
164
|
updateColumns(e) {
|
|
162
165
|
u.value = e;
|
|
163
166
|
},
|
|
164
167
|
updateSize(e) {
|
|
165
|
-
|
|
168
|
+
k.value = e;
|
|
166
169
|
},
|
|
167
|
-
dataSource: s(() =>
|
|
170
|
+
dataSource: s(() => r(c).records)
|
|
168
171
|
});
|
|
169
|
-
const
|
|
170
|
-
var e,
|
|
171
|
-
return
|
|
172
|
-
let n =
|
|
173
|
-
return
|
|
172
|
+
const j = s(() => {
|
|
173
|
+
var e, t, a;
|
|
174
|
+
return K++, ((a = (t = (e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !oe.includes(l.valueType))) == null ? void 0 : t.sort((l, d) => {
|
|
175
|
+
let n = re(l.order);
|
|
176
|
+
return re(d.order) - n;
|
|
174
177
|
})) == null ? void 0 : a.map((l) => {
|
|
175
|
-
const d =
|
|
178
|
+
const d = je(l, We(l.fieldProps, {})), n = {
|
|
176
179
|
...l,
|
|
177
180
|
fieldProps: {
|
|
178
181
|
label: l.title,
|
|
179
182
|
name: l.dataIndex,
|
|
180
183
|
...d || {},
|
|
181
|
-
_signal:
|
|
184
|
+
_signal: K
|
|
182
185
|
},
|
|
183
186
|
renderNode: void 0
|
|
184
187
|
};
|
|
185
|
-
return n.renderNode =
|
|
188
|
+
return n.renderNode = He(n, r(L)), n;
|
|
186
189
|
})) || [];
|
|
187
|
-
}),
|
|
190
|
+
}), pe = s(() => te(r(u), (e) => {
|
|
188
191
|
if (e.sorter === !0)
|
|
189
192
|
return e.key || e.dataIndex;
|
|
190
|
-
}).filter(Boolean)),
|
|
193
|
+
}).filter(Boolean)), fe = s(() => te(r(u), (e) => {
|
|
191
194
|
if (e.filters && !e.onFilter)
|
|
192
195
|
return e.key || e.dataIndex;
|
|
193
|
-
}).filter(Boolean)),
|
|
196
|
+
}).filter(Boolean)), me = s(() => b(o.dataSource) ? c.records : o.dataSource), {
|
|
194
197
|
rowSelection: C,
|
|
195
|
-
selectedRows:
|
|
196
|
-
...
|
|
197
|
-
} =
|
|
198
|
+
selectedRows: T,
|
|
199
|
+
...F
|
|
200
|
+
} = Xe({
|
|
198
201
|
fixed: !0,
|
|
199
202
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
200
203
|
rowKey: o.rowKey,
|
|
201
|
-
dataSource:
|
|
204
|
+
dataSource: me
|
|
202
205
|
}), {
|
|
203
|
-
formRef:
|
|
204
|
-
submit:
|
|
205
|
-
reset:
|
|
206
|
-
tableProps:
|
|
207
|
-
refresh:
|
|
208
|
-
data:
|
|
209
|
-
setDataSource:
|
|
210
|
-
getColumnSFConfig:
|
|
211
|
-
} =
|
|
206
|
+
formRef: z,
|
|
207
|
+
submit: W,
|
|
208
|
+
reset: H,
|
|
209
|
+
tableProps: _,
|
|
210
|
+
refresh: ye,
|
|
211
|
+
data: c,
|
|
212
|
+
setDataSource: ge,
|
|
213
|
+
getColumnSFConfig: be
|
|
214
|
+
} = De({
|
|
212
215
|
async request(e) {
|
|
213
216
|
var a, l;
|
|
214
|
-
if (!C.value.preserveSelectedRowKeys &&
|
|
217
|
+
if (!C.value.preserveSelectedRowKeys && b(o.dataSource) && F.clearAll(), !b(o.dataSource))
|
|
215
218
|
return {
|
|
216
219
|
data: o.dataSource || [],
|
|
217
220
|
total: o.dataSource.length || 0
|
|
218
221
|
};
|
|
219
|
-
const
|
|
220
|
-
return (l = o.onLoad) == null || l.call(o, (
|
|
221
|
-
data: (
|
|
222
|
-
total: (
|
|
222
|
+
const t = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
223
|
+
return (l = o.onLoad) == null || l.call(o, (t == null ? void 0 : t.data) || []), {
|
|
224
|
+
data: (t == null ? void 0 : t.data) || [],
|
|
225
|
+
total: (t == null ? void 0 : t.total) || 0
|
|
223
226
|
};
|
|
224
227
|
},
|
|
225
|
-
filterFields:
|
|
226
|
-
sortFields:
|
|
228
|
+
filterFields: fe,
|
|
229
|
+
sortFields: pe,
|
|
227
230
|
defaultParams: o.params,
|
|
228
231
|
defaultData: o.defaultData,
|
|
229
232
|
manual: o.manual,
|
|
230
233
|
formatParams: o.beforeSearchSubmit,
|
|
231
234
|
pagination: o.pagination
|
|
232
|
-
}),
|
|
235
|
+
}), he = () => {
|
|
233
236
|
var a;
|
|
234
237
|
let e = ((a = o.columns) == null ? void 0 : a.filter((l) => !l.hideInTable)) || [];
|
|
235
|
-
function
|
|
238
|
+
function t(l, d) {
|
|
236
239
|
return l.map((n) => ({
|
|
237
|
-
resizable:
|
|
238
|
-
...
|
|
239
|
-
...
|
|
240
|
+
resizable: Ze(n.resizable) ? n.resizable : o.columnResizable,
|
|
241
|
+
...ae(_e(n), ["ellipsis"]),
|
|
242
|
+
...be(n),
|
|
240
243
|
fixed: d ? d.fixed : n.fixed,
|
|
241
|
-
title:
|
|
244
|
+
title: qe(n, O("table-header", "title"), v.headerCell, r(de).colorPrimary),
|
|
242
245
|
customRender({
|
|
243
|
-
value:
|
|
244
|
-
...
|
|
246
|
+
value: p,
|
|
247
|
+
...h
|
|
245
248
|
}) {
|
|
246
|
-
var
|
|
247
|
-
const
|
|
249
|
+
var G, M;
|
|
250
|
+
const q = Ue(n), xe = Ge({
|
|
248
251
|
...n,
|
|
249
|
-
valueType:
|
|
252
|
+
valueType: q
|
|
250
253
|
}, {
|
|
251
|
-
value:
|
|
252
|
-
...
|
|
253
|
-
}),
|
|
254
|
-
value:
|
|
255
|
-
...
|
|
256
|
-
})) ||
|
|
257
|
-
value:
|
|
258
|
-
...
|
|
259
|
-
})]) :
|
|
260
|
-
let
|
|
261
|
-
return n.customRender && (
|
|
262
|
-
value:
|
|
263
|
-
...
|
|
254
|
+
value: p,
|
|
255
|
+
...h
|
|
256
|
+
}), Be = Me(q, xe, h.record, r(L)), U = ((G = n.renderText) == null ? void 0 : G.call(n, {
|
|
257
|
+
value: p,
|
|
258
|
+
...h
|
|
259
|
+
})) || p, ke = n.renderText ? m(J, null, [(M = n.renderText) == null ? void 0 : M.call(n, {
|
|
260
|
+
value: p,
|
|
261
|
+
...h
|
|
262
|
+
})]) : Be;
|
|
263
|
+
let N = ve(n, U, ke);
|
|
264
|
+
return n.customRender && (N = n.customRender({
|
|
265
|
+
value: p,
|
|
266
|
+
...h,
|
|
264
267
|
column: n,
|
|
265
|
-
originalNode:
|
|
266
|
-
originalText:
|
|
267
|
-
})),
|
|
268
|
+
originalNode: N,
|
|
269
|
+
originalText: U
|
|
270
|
+
})), N;
|
|
268
271
|
},
|
|
269
|
-
children:
|
|
272
|
+
children: t(n.children || [], d || n)
|
|
270
273
|
}));
|
|
271
274
|
}
|
|
272
|
-
return
|
|
275
|
+
return t(e);
|
|
273
276
|
};
|
|
274
|
-
|
|
275
|
-
const e =
|
|
276
|
-
u.value = e,
|
|
277
|
+
Ne(() => {
|
|
278
|
+
const e = he();
|
|
279
|
+
u.value = e, V.value = e;
|
|
277
280
|
});
|
|
278
|
-
const
|
|
279
|
-
var
|
|
280
|
-
if (o.adaptive && (
|
|
281
|
+
const Se = s(() => {
|
|
282
|
+
var t, a;
|
|
283
|
+
if (o.adaptive && (c.total > 0 || ((t = o.dataSource) == null ? void 0 : t.length)))
|
|
281
284
|
return {
|
|
282
|
-
y:
|
|
285
|
+
y: r(ie),
|
|
283
286
|
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
284
287
|
};
|
|
285
288
|
if (o.scroll)
|
|
286
289
|
return o.scroll;
|
|
287
|
-
}),
|
|
290
|
+
}), we = s(() => {
|
|
288
291
|
var e;
|
|
289
292
|
if (o.tableLayout)
|
|
290
293
|
return o.tableLayout;
|
|
291
|
-
if ((e = o.columns) != null && e.some((
|
|
294
|
+
if ((e = o.columns) != null && e.some((t) => t.ellipsis))
|
|
292
295
|
return "fixed";
|
|
293
|
-
}),
|
|
296
|
+
}), P = s(() => {
|
|
294
297
|
var a;
|
|
295
|
-
const e =
|
|
298
|
+
const e = r(_), t = r(C);
|
|
296
299
|
return {
|
|
297
300
|
...o,
|
|
298
301
|
...e,
|
|
299
302
|
rowSelection: o.rowSelection === !0 || ((a = o.rowSelection) == null ? void 0 : a.mode) === "internal" ? {
|
|
300
|
-
...
|
|
303
|
+
...t,
|
|
301
304
|
// tips 如果是前端分页,则默认会走缓存
|
|
302
|
-
preserveSelectedRowKeys:
|
|
303
|
-
} :
|
|
304
|
-
loading:
|
|
305
|
+
preserveSelectedRowKeys: b(o.dataSource) ? t.preserveSelectedRowKeys : !0
|
|
306
|
+
} : Je(o.rowSelection),
|
|
307
|
+
loading: b(o.loading) ? e.loading : o.loading,
|
|
305
308
|
pagination: o.pagination === !1 ? !1 : e.pagination,
|
|
306
|
-
scroll:
|
|
309
|
+
scroll: r(Se)
|
|
307
310
|
};
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
return
|
|
311
|
+
}), Re = s(() => {
|
|
312
|
+
var e;
|
|
313
|
+
return [i(), o.card ? null : i("wrapper"), o.adaptive ? i("adaptive") : null, (e = D.value) != null && e.visible ? ue("horizontal", "scrollable") : null].filter(Boolean);
|
|
314
|
+
});
|
|
315
|
+
function ve(e, t, a) {
|
|
316
|
+
return oe.includes(e.valueType) ? a : e.copyable || e.ellipsis ? m(ro, {
|
|
311
317
|
copyable: e.copyable,
|
|
312
|
-
ellipsis: e.ellipsis ?
|
|
318
|
+
ellipsis: e.ellipsis ? $e(e.ellipsis) ? {
|
|
313
319
|
tooltip: a,
|
|
314
320
|
rows: 1
|
|
315
321
|
} : {
|
|
@@ -319,53 +325,62 @@ const bo = /* @__PURE__ */ Te({
|
|
|
319
325
|
content: a
|
|
320
326
|
}, null) : a;
|
|
321
327
|
}
|
|
322
|
-
|
|
323
|
-
var
|
|
324
|
-
(
|
|
325
|
-
}),
|
|
326
|
-
|
|
328
|
+
I(() => r(c).loading, (e) => {
|
|
329
|
+
var t;
|
|
330
|
+
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
331
|
+
}), I(() => r(c).records, () => {
|
|
332
|
+
var e;
|
|
333
|
+
$.value = (e = A.value) == null ? void 0 : e.querySelector(".ant-table-container > div:last-child");
|
|
334
|
+
}, {
|
|
335
|
+
flush: "post",
|
|
336
|
+
immediate: !0,
|
|
337
|
+
deep: !0
|
|
338
|
+
}), I(() => o.dataSource, (e) => {
|
|
339
|
+
ge(e);
|
|
327
340
|
}, {
|
|
328
341
|
immediate: !0
|
|
329
342
|
});
|
|
330
|
-
function
|
|
331
|
-
var
|
|
332
|
-
(l = (a = (
|
|
343
|
+
function Ce(e) {
|
|
344
|
+
var t, a, l;
|
|
345
|
+
(l = (a = (t = z.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || l.call(a, e);
|
|
333
346
|
}
|
|
334
|
-
function
|
|
347
|
+
function Te(e = !1) {
|
|
335
348
|
var a, l, d;
|
|
336
|
-
const
|
|
337
|
-
return (d = (l = (a =
|
|
349
|
+
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
350
|
+
return (d = (l = (a = z.value) == null ? void 0 : a.apForm) == null ? void 0 : l[t]) == null ? void 0 : d.call(l, !0);
|
|
338
351
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
352
|
+
function Fe() {
|
|
353
|
+
return r(u);
|
|
341
354
|
}
|
|
342
|
-
return
|
|
343
|
-
submit: () =>
|
|
344
|
-
reset: () =>
|
|
345
|
-
refresh: () =>
|
|
346
|
-
setSearchFormValues:
|
|
347
|
-
getSearchFormValues:
|
|
348
|
-
getShownColumns:
|
|
349
|
-
dataSource: s(() =>
|
|
355
|
+
return ne({
|
|
356
|
+
submit: () => W(),
|
|
357
|
+
reset: () => H(),
|
|
358
|
+
refresh: () => ye(),
|
|
359
|
+
setSearchFormValues: Ce,
|
|
360
|
+
getSearchFormValues: Te,
|
|
361
|
+
getShownColumns: Fe,
|
|
362
|
+
dataSource: s(() => r(c).records),
|
|
350
363
|
rowSelection: {
|
|
351
|
-
selectedRows: s(() =>
|
|
352
|
-
...
|
|
364
|
+
selectedRows: s(() => r(T)),
|
|
365
|
+
...F
|
|
353
366
|
}
|
|
354
|
-
}), (e,
|
|
355
|
-
|
|
356
|
-
|
|
367
|
+
}), (e, t) => (y(), x("div", {
|
|
368
|
+
ref_key: "apTableRef",
|
|
369
|
+
ref: A,
|
|
370
|
+
class: g(Re.value)
|
|
371
|
+
}, [r(b)(e.dataSource) && e.searchForm !== !1 && j.value.length > 0 ? (y(), x("div", {
|
|
357
372
|
key: 0,
|
|
358
|
-
class:
|
|
359
|
-
style:
|
|
360
|
-
}, [
|
|
373
|
+
class: g(e.card ? r(B)("search-wrapper") : null),
|
|
374
|
+
style: Q(e.searchFormWrapperStyle)
|
|
375
|
+
}, [m(r(Ae).SearchForm, S(e.searchForm || {}, {
|
|
361
376
|
ref_key: "formRef",
|
|
362
|
-
ref:
|
|
377
|
+
ref: z,
|
|
363
378
|
"custom-reset": "",
|
|
364
|
-
"submit-loading":
|
|
365
|
-
onSubmit:
|
|
366
|
-
onReset:
|
|
367
|
-
}),
|
|
368
|
-
default:
|
|
379
|
+
"submit-loading": r(_).loading,
|
|
380
|
+
onSubmit: r(W),
|
|
381
|
+
onReset: r(H)
|
|
382
|
+
}), X({
|
|
383
|
+
default: w(() => [(y(!0), x(J, null, Y(j.value, (a) => (y(), Z(Ie(a.renderNode.Comp), S({
|
|
369
384
|
key: a.dataIndex,
|
|
370
385
|
item: a,
|
|
371
386
|
ref_for: !0
|
|
@@ -374,56 +389,66 @@ const bo = /* @__PURE__ */ Te({
|
|
|
374
389
|
"custom-render": a.renderNode.render
|
|
375
390
|
}), null, 16, ["item", "span", "custom-render"]))), 128))]),
|
|
376
391
|
_: 2
|
|
377
|
-
}, [
|
|
392
|
+
}, [v.searchFormExtra ? {
|
|
378
393
|
name: "extra",
|
|
379
|
-
fn:
|
|
394
|
+
fn: w(() => [R(e.$slots, "searchFormExtra")]),
|
|
380
395
|
key: "0"
|
|
381
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
396
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ee("", !0), E("div", {
|
|
382
397
|
ref_key: "contentRef",
|
|
383
|
-
ref:
|
|
384
|
-
class:
|
|
385
|
-
style:
|
|
386
|
-
}, [
|
|
387
|
-
class:
|
|
388
|
-
}, [e.settings ? (
|
|
398
|
+
ref: ce,
|
|
399
|
+
class: g([r(B)("table-wrapper"), e.card ? r(B)("table-wrapper-card") : null]),
|
|
400
|
+
style: Q(e.tableWrapperStyle)
|
|
401
|
+
}, [E("div", {
|
|
402
|
+
class: g(r(i)("header-wrapper"))
|
|
403
|
+
}, [e.settings ? (y(), x("div", {
|
|
389
404
|
key: 0,
|
|
390
|
-
class:
|
|
391
|
-
}, [
|
|
392
|
-
class:
|
|
393
|
-
}, [
|
|
394
|
-
selectedRows:
|
|
395
|
-
selectedRowKeys:
|
|
405
|
+
class: g(r(i)("header"))
|
|
406
|
+
}, [E("div", {
|
|
407
|
+
class: g(r(O)("header", "title"))
|
|
408
|
+
}, [R(e.$slots, "title", S({
|
|
409
|
+
selectedRows: r(T),
|
|
410
|
+
selectedRowKeys: r(C).selectedRowKeys,
|
|
396
411
|
shownColumns: u.value
|
|
397
|
-
},
|
|
412
|
+
}, F))], 2), v.title ? (y(), Z(r(Oe), {
|
|
398
413
|
key: 0,
|
|
399
414
|
type: "vertical"
|
|
400
|
-
})) :
|
|
415
|
+
})) : ee("", !0), m(to, {
|
|
401
416
|
config: e.settings === !0 ? {} : e.settings
|
|
402
|
-
}, null, 8, ["config"])], 2)) :
|
|
417
|
+
}, null, 8, ["config"])], 2)) : R(e.$slots, "title", S({
|
|
403
418
|
key: 1,
|
|
404
|
-
selectedRows:
|
|
405
|
-
selectedRowKeys:
|
|
419
|
+
selectedRows: r(T),
|
|
420
|
+
selectedRowKeys: r(C).selectedRowKeys,
|
|
406
421
|
shownColumns: u.value
|
|
407
|
-
},
|
|
408
|
-
class:
|
|
409
|
-
},
|
|
410
|
-
size:
|
|
411
|
-
"table-layout":
|
|
422
|
+
}, F))], 2), m(r(Le), S({
|
|
423
|
+
class: r(i)("table")
|
|
424
|
+
}, P.value, {
|
|
425
|
+
size: k.value,
|
|
426
|
+
"table-layout": we.value,
|
|
412
427
|
columns: u.value,
|
|
413
|
-
onResizeColumn:
|
|
414
|
-
}),
|
|
415
|
-
summary:
|
|
428
|
+
onResizeColumn: t[0] || (t[0] = (a, l) => l.width = a)
|
|
429
|
+
}), X({
|
|
430
|
+
summary: w(() => [R(e.$slots, "summary", {
|
|
416
431
|
columns: u.value,
|
|
417
|
-
records:
|
|
418
|
-
selectedRows:
|
|
432
|
+
records: P.value.dataSource,
|
|
433
|
+
selectedRows: r(T)
|
|
419
434
|
})]),
|
|
435
|
+
bottomPaginationTop: w(() => {
|
|
436
|
+
var a;
|
|
437
|
+
return [m(r(lo), {
|
|
438
|
+
ref_key: "scrollBarRef",
|
|
439
|
+
ref: D,
|
|
440
|
+
"scroll-container": $.value,
|
|
441
|
+
direction: "horizontal",
|
|
442
|
+
"extra-size": (a = P.value.scroll) != null && a.y ? r(se) : 0
|
|
443
|
+
}, null, 8, ["scroll-container", "extra-size"])];
|
|
444
|
+
}),
|
|
420
445
|
_: 2
|
|
421
|
-
}, [
|
|
446
|
+
}, [Y(r(ae)(v, ["title", "searchFormExtra", "headerCell", "summary"]), (a, l) => ({
|
|
422
447
|
name: l,
|
|
423
|
-
fn:
|
|
448
|
+
fn: w((d) => [R(e.$slots, l, Ee(Ke(d || {})))])
|
|
424
449
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
425
450
|
}
|
|
426
451
|
});
|
|
427
452
|
export {
|
|
428
|
-
|
|
453
|
+
ko as default
|
|
429
454
|
};
|
|
@@ -77,6 +77,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
77
77
|
type: StringConstructor;
|
|
78
78
|
default: undefined;
|
|
79
79
|
};
|
|
80
|
+
onRemove: {
|
|
81
|
+
type: FunctionConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
80
84
|
}>, {
|
|
81
85
|
done: ComputedRef<boolean>;
|
|
82
86
|
clear: typeof clear;
|
|
@@ -148,6 +152,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
148
152
|
type: StringConstructor;
|
|
149
153
|
default: undefined;
|
|
150
154
|
};
|
|
155
|
+
onRemove: {
|
|
156
|
+
type: FunctionConstructor;
|
|
157
|
+
default: undefined;
|
|
158
|
+
};
|
|
151
159
|
}>> & Readonly<{
|
|
152
160
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
153
161
|
}>, {
|
|
@@ -167,6 +175,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
167
175
|
customRequest: CustomRequest;
|
|
168
176
|
maxSizeErrorMsg: string;
|
|
169
177
|
acceptErrorMsg: string;
|
|
178
|
+
onRemove: Function;
|
|
170
179
|
maxCount: number;
|
|
171
180
|
maxCountErrorMsg: string;
|
|
172
181
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, ref as g, computed as v, provide as t, openBlock as y, createElementBlock as
|
|
1
|
+
import { defineComponent as A, ref as g, computed as v, provide as t, openBlock as y, createElementBlock as R, normalizeClass as U, unref as $, createBlock as k, resolveDynamicComponent as T, mergeProps as B, createSlots as L, renderList as q, withCtx as P, renderSlot as V, normalizeProps as w, guardReactiveProps as D } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
@@ -12,7 +12,7 @@ import Q from "./components/SingleFile.vue2.mjs";
|
|
|
12
12
|
import W from "./components/MultipleFile.vue2.mjs";
|
|
13
13
|
import X from "./components/Picture.vue2.mjs";
|
|
14
14
|
import { useGlobalConfig as C } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
-
const
|
|
15
|
+
const pe = /* @__PURE__ */ A({
|
|
16
16
|
name: "AplusFileUpload",
|
|
17
17
|
__name: "apUpload",
|
|
18
18
|
props: {
|
|
@@ -79,35 +79,39 @@ const me = /* @__PURE__ */ A({
|
|
|
79
79
|
acceptErrorMsg: {
|
|
80
80
|
type: String,
|
|
81
81
|
default: void 0
|
|
82
|
+
},
|
|
83
|
+
onRemove: {
|
|
84
|
+
type: Function,
|
|
85
|
+
default: void 0
|
|
82
86
|
}
|
|
83
87
|
},
|
|
84
88
|
emits: ["update:value"],
|
|
85
89
|
setup(S, { expose: b, emit: x }) {
|
|
86
|
-
var
|
|
87
|
-
const { t:
|
|
88
|
-
G(
|
|
89
|
-
const { b:
|
|
90
|
+
var m, p, d, f;
|
|
91
|
+
const { t: u, lang: F } = J();
|
|
92
|
+
G(u), I(u, F);
|
|
93
|
+
const { b: M } = K("ap-upload"), n = g(null), e = S, N = x, _ = {
|
|
90
94
|
singleFile: Q,
|
|
91
95
|
multipleFile: W,
|
|
92
96
|
picture: X
|
|
93
|
-
}, s = H.useInjectFormItemContext(),
|
|
97
|
+
}, s = H.useInjectFormItemContext(), E = v({
|
|
94
98
|
get() {
|
|
95
99
|
return e.value;
|
|
96
100
|
},
|
|
97
101
|
set(o) {
|
|
98
102
|
var a;
|
|
99
|
-
|
|
103
|
+
N("update:value", o), s == null || s.onFieldChange(), (a = e.onChange) == null || a.call(e, o);
|
|
100
104
|
}
|
|
101
105
|
}), O = C("uiMode"), i = C("apUpload");
|
|
102
|
-
t("theme", O.value), t("value",
|
|
106
|
+
t("theme", O.value), t("value", E), t("dirName", e.dirName ?? ((m = i.value) == null ? void 0 : m.dirName)), t(
|
|
103
107
|
"needName",
|
|
104
|
-
e.needName ?? ((
|
|
108
|
+
e.needName ?? ((p = i.value) == null ? void 0 : p.needName) ?? !1
|
|
105
109
|
), t("accept", e.accept ?? ((d = i.value) == null ? void 0 : d.accept) ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t(
|
|
106
110
|
"getOssAccess",
|
|
107
111
|
e.getOssAccess ?? ((f = i.value) == null ? void 0 : f.getOssAccess)
|
|
108
|
-
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg);
|
|
109
|
-
const z = v(() =>
|
|
110
|
-
t("uploadingCount",
|
|
112
|
+
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove);
|
|
113
|
+
const z = v(() => l.value === 0), l = g(0);
|
|
114
|
+
t("uploadingCount", l);
|
|
111
115
|
function h() {
|
|
112
116
|
c(void 0);
|
|
113
117
|
}
|
|
@@ -119,13 +123,13 @@ const me = /* @__PURE__ */ A({
|
|
|
119
123
|
done: z,
|
|
120
124
|
clear: h,
|
|
121
125
|
setValue: c
|
|
122
|
-
}), (o, a) => (y(),
|
|
123
|
-
class: $(
|
|
126
|
+
}), (o, a) => (y(), R("div", {
|
|
127
|
+
class: U($(M)())
|
|
124
128
|
}, [
|
|
125
|
-
(y(), T(
|
|
129
|
+
(y(), k(T(_[e.type]), B(o.$attrs, {
|
|
126
130
|
ref_key: "uploadRef",
|
|
127
131
|
ref: n
|
|
128
|
-
}),
|
|
132
|
+
}), L({ _: 2 }, [
|
|
129
133
|
q(Object.keys(o.$slots), (r) => ({
|
|
130
134
|
name: r,
|
|
131
135
|
fn: P((j) => [
|
|
@@ -137,5 +141,5 @@ const me = /* @__PURE__ */ A({
|
|
|
137
141
|
}
|
|
138
142
|
});
|
|
139
143
|
export {
|
|
140
|
-
|
|
144
|
+
pe as default
|
|
141
145
|
};
|