@aplus-frontend/ui 0.4.25 → 0.4.27
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 +157 -154
- package/es/src/config-provider/config-provider.d.ts +0 -3
- package/es/src/config-provider/css-var.d.ts +0 -4
- package/es/src/config-provider/css-var.mjs +14 -22
- package/es/src/config-provider/index.d.ts +0 -15
- package/es/src/locale/lang/en.mjs +4 -2
- package/es/src/locale/lang/zh-cn.mjs +3 -2
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +24 -21
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +0 -3
- package/lib/src/config-provider/css-var.d.ts +0 -4
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +0 -15
- 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/work-order-modal.vue.d.ts +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +2 -2
- package/theme/ap-table/ap-table.css +48 -2
- package/theme/ap-table/ap-table.less +6 -2
- package/theme/ap-table-modal/index.css +48 -2
- package/theme/index.css +2 -2
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { defineComponent as Ne, useSlots as Ie, ref as h, computed as s, unref as t, createVNode as p, Fragment as X, watchEffect as Ee, watch as Y, openBlock as m, createElementBlock as k, normalizeClass as y, normalizeStyle as I, mergeProps as w, createSlots as Z, withCtx as v, renderList as ee, createBlock as oe, resolveDynamicComponent as Ke, renderSlot as R, createCommentVNode as ae, createElementVNode as E, normalizeProps as Oe, guardReactiveProps as Ve } from "vue";
|
|
2
|
+
import { Divider as Le, Table as $e } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Ae } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as De } from "../ap-form/index.mjs";
|
|
5
|
+
import { noRenderAsFormItemValueList as re } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as g, omit as
|
|
9
|
-
import { getColumnOrder as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { isDef as
|
|
7
|
+
import { useTablePaging as We } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as g, omit as te, isBoolean as je } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as le, updateFormProps as _e, getFieldProps as He, getSearchFormItemRenderNode as Ue, recursionApColumns as ne, apColumnToColumn as qe, getTableTitle as Me, getTableRenderType as Ge, getTableRenderProps as Je, getTableCellRenderNode as Qe, falseToUndefined as Xe } from "./utils.mjs";
|
|
10
|
+
import Ye from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import Ze from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { getScrollbarSize as eo, isDef as oo } 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
|
|
15
|
+
import { useProvideApTable as ao } from "./context.mjs";
|
|
16
16
|
import "../scroll-bar/index.mjs";
|
|
17
|
-
import { useStickyScroll as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
24
|
-
const No = /* @__PURE__ */ ze({
|
|
17
|
+
import { useStickyScroll as ro } from "./hooks/use-sticky-scroll.mjs";
|
|
18
|
+
import { useNamespace as to } from "../config-provider/hooks/use-namespace.mjs";
|
|
19
|
+
import { useGlobalConfig as lo } from "../config-provider/hooks/use-global-config.mjs";
|
|
20
|
+
import no from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
21
|
+
import so from "./components/setting/modal/index.vue2.mjs";
|
|
22
|
+
import uo from "../scroll-bar/index.vue.mjs";
|
|
23
|
+
const Io = /* @__PURE__ */ Ne({
|
|
25
24
|
name: "ApTable",
|
|
26
25
|
__name: "ap-table",
|
|
27
26
|
props: {
|
|
@@ -145,24 +144,25 @@ const No = /* @__PURE__ */ ze({
|
|
|
145
144
|
default: void 0
|
|
146
145
|
}
|
|
147
146
|
},
|
|
148
|
-
setup(
|
|
149
|
-
expose:
|
|
147
|
+
setup(se, {
|
|
148
|
+
expose: de
|
|
150
149
|
}) {
|
|
151
|
-
const o =
|
|
152
|
-
let
|
|
153
|
-
const C =
|
|
150
|
+
const o = se;
|
|
151
|
+
let K = 0;
|
|
152
|
+
const C = Ie(), [, ue] = Ae(), {
|
|
154
153
|
e: B,
|
|
155
154
|
b: c,
|
|
156
|
-
be:
|
|
157
|
-
m:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
be: O,
|
|
156
|
+
m: ie,
|
|
157
|
+
cssVar: ce
|
|
158
|
+
} = to("ap-table"), V = lo("valueTypeMap"), {
|
|
159
|
+
height: fe,
|
|
160
|
+
contentRef: pe
|
|
161
|
+
} = Ye(), L = h(), $ = h(), {
|
|
162
162
|
isStickyMode: A,
|
|
163
163
|
scrollBarRef: i
|
|
164
|
-
} =
|
|
165
|
-
|
|
164
|
+
} = ro(L), z = h(o.size), u = h([]), D = h([]), W = eo();
|
|
165
|
+
ao({
|
|
166
166
|
columns: s(() => u.value),
|
|
167
167
|
columnsBackup: s(() => D.value),
|
|
168
168
|
size: s(() => z.value),
|
|
@@ -172,106 +172,106 @@ const No = /* @__PURE__ */ ze({
|
|
|
172
172
|
updateSize(e) {
|
|
173
173
|
z.value = e;
|
|
174
174
|
},
|
|
175
|
-
dataSource: s(() =>
|
|
175
|
+
dataSource: s(() => t(b).records)
|
|
176
176
|
});
|
|
177
|
-
const
|
|
177
|
+
const j = s(() => {
|
|
178
178
|
var e, r, a;
|
|
179
|
-
return
|
|
180
|
-
let n =
|
|
181
|
-
return
|
|
182
|
-
})) == null ? void 0 : a.map((
|
|
183
|
-
const d =
|
|
184
|
-
...
|
|
179
|
+
return K++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !re.includes(l.valueType))) == null ? void 0 : r.sort((l, d) => {
|
|
180
|
+
let n = le(l.order);
|
|
181
|
+
return le(d.order) - n;
|
|
182
|
+
})) == null ? void 0 : a.map((l) => {
|
|
183
|
+
const d = _e(l, He(l.fieldProps, {})), n = {
|
|
184
|
+
...l,
|
|
185
185
|
fieldProps: {
|
|
186
|
-
label:
|
|
187
|
-
name:
|
|
186
|
+
label: l.title,
|
|
187
|
+
name: l.dataIndex,
|
|
188
188
|
...d || {},
|
|
189
|
-
_signal:
|
|
189
|
+
_signal: K
|
|
190
190
|
},
|
|
191
191
|
renderNode: void 0
|
|
192
192
|
};
|
|
193
|
-
return n.renderNode =
|
|
193
|
+
return n.renderNode = Ue(n, t(V)), n;
|
|
194
194
|
})) || [];
|
|
195
|
-
}),
|
|
195
|
+
}), me = s(() => ne(t(u), (e) => {
|
|
196
196
|
if (e.sorter === !0)
|
|
197
197
|
return e.key || e.dataIndex;
|
|
198
|
-
}).filter(Boolean)),
|
|
198
|
+
}).filter(Boolean)), ye = s(() => ne(t(u), (e) => {
|
|
199
199
|
if (e.filters && !e.onFilter)
|
|
200
200
|
return e.key || e.dataIndex;
|
|
201
|
-
}).filter(Boolean)),
|
|
201
|
+
}).filter(Boolean)), ge = s(() => g(o.dataSource) ? b.records : o.dataSource), {
|
|
202
202
|
rowSelection: T,
|
|
203
203
|
selectedRows: F,
|
|
204
204
|
...x
|
|
205
|
-
} =
|
|
205
|
+
} = Ze({
|
|
206
206
|
fixed: !0,
|
|
207
207
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
208
208
|
rowKey: o.rowKey,
|
|
209
|
-
dataSource:
|
|
209
|
+
dataSource: ge
|
|
210
210
|
}), {
|
|
211
211
|
formRef: P,
|
|
212
|
-
submit:
|
|
213
|
-
reset:
|
|
214
|
-
tableProps:
|
|
215
|
-
refresh:
|
|
212
|
+
submit: _,
|
|
213
|
+
reset: H,
|
|
214
|
+
tableProps: U,
|
|
215
|
+
refresh: be,
|
|
216
216
|
data: b,
|
|
217
|
-
setDataSource:
|
|
218
|
-
getColumnSFConfig:
|
|
219
|
-
} =
|
|
217
|
+
setDataSource: Se,
|
|
218
|
+
getColumnSFConfig: he
|
|
219
|
+
} = We({
|
|
220
220
|
async request(e) {
|
|
221
|
-
var a,
|
|
221
|
+
var a, l;
|
|
222
222
|
if (!T.value.preserveSelectedRowKeys && g(o.dataSource) && x.clearAll(), !g(o.dataSource))
|
|
223
223
|
return {
|
|
224
224
|
data: o.dataSource || [],
|
|
225
225
|
total: o.dataSource.length || 0
|
|
226
226
|
};
|
|
227
227
|
const r = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
228
|
-
return (
|
|
228
|
+
return (l = o.onLoad) == null || l.call(o, (r == null ? void 0 : r.data) || []), {
|
|
229
229
|
data: (r == null ? void 0 : r.data) || [],
|
|
230
230
|
total: (r == null ? void 0 : r.total) || 0
|
|
231
231
|
};
|
|
232
232
|
},
|
|
233
|
-
filterFields:
|
|
234
|
-
sortFields:
|
|
233
|
+
filterFields: ye,
|
|
234
|
+
sortFields: me,
|
|
235
235
|
defaultParams: o.params,
|
|
236
236
|
defaultData: o.defaultData,
|
|
237
237
|
manual: o.manual,
|
|
238
238
|
formatParams: o.beforeSearchSubmit,
|
|
239
239
|
pagination: o.pagination
|
|
240
|
-
}),
|
|
240
|
+
}), we = () => {
|
|
241
241
|
var a;
|
|
242
|
-
let e = ((a = o.columns) == null ? void 0 : a.filter((
|
|
243
|
-
function r(
|
|
244
|
-
return
|
|
245
|
-
resizable:
|
|
246
|
-
...
|
|
247
|
-
...
|
|
242
|
+
let e = ((a = o.columns) == null ? void 0 : a.filter((l) => !l.hideInTable)) || [];
|
|
243
|
+
function r(l, d) {
|
|
244
|
+
return l.map((n) => ({
|
|
245
|
+
resizable: oo(n.resizable) ? n.resizable : o.columnResizable,
|
|
246
|
+
...te(qe(n), ["ellipsis"]),
|
|
247
|
+
...he(n),
|
|
248
248
|
fixed: d ? d.fixed : n.fixed,
|
|
249
|
-
title:
|
|
249
|
+
title: Me(n, O("table-header", "title"), C.headerCell, t(ue).colorPrimary),
|
|
250
250
|
customRender({
|
|
251
251
|
value: f,
|
|
252
252
|
...S
|
|
253
253
|
}) {
|
|
254
|
-
var
|
|
255
|
-
const
|
|
254
|
+
var J, Q;
|
|
255
|
+
const M = Ge(n), Be = Je({
|
|
256
256
|
...n,
|
|
257
|
-
valueType:
|
|
257
|
+
valueType: M
|
|
258
258
|
}, {
|
|
259
259
|
value: f,
|
|
260
260
|
...S
|
|
261
|
-
}),
|
|
261
|
+
}), ze = Qe(M, Be, S.record, t(V)), G = ((J = n.renderText) == null ? void 0 : J.call(n, {
|
|
262
262
|
value: f,
|
|
263
263
|
...S
|
|
264
|
-
})) || f,
|
|
264
|
+
})) || f, Pe = n.renderText ? p(X, null, [(Q = n.renderText) == null ? void 0 : Q.call(n, {
|
|
265
265
|
value: f,
|
|
266
266
|
...S
|
|
267
|
-
})]) :
|
|
268
|
-
let N =
|
|
267
|
+
})]) : ze;
|
|
268
|
+
let N = Te(n, G, Pe);
|
|
269
269
|
return n.customRender && (N = n.customRender({
|
|
270
270
|
value: f,
|
|
271
271
|
...S,
|
|
272
272
|
column: n,
|
|
273
273
|
originalNode: N,
|
|
274
|
-
originalText:
|
|
274
|
+
originalText: G
|
|
275
275
|
})), N;
|
|
276
276
|
},
|
|
277
277
|
children: r(n.children || [], d || n)
|
|
@@ -279,28 +279,28 @@ const No = /* @__PURE__ */ ze({
|
|
|
279
279
|
}
|
|
280
280
|
return r(e);
|
|
281
281
|
};
|
|
282
|
-
|
|
283
|
-
const e =
|
|
282
|
+
Ee(() => {
|
|
283
|
+
const e = we();
|
|
284
284
|
u.value = e, D.value = e;
|
|
285
285
|
});
|
|
286
|
-
const
|
|
286
|
+
const ve = s(() => {
|
|
287
287
|
var r, a;
|
|
288
288
|
if (o.adaptive && (b.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)))
|
|
289
289
|
return {
|
|
290
|
-
y:
|
|
290
|
+
y: t(fe),
|
|
291
291
|
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
292
292
|
};
|
|
293
293
|
if (o.scroll)
|
|
294
294
|
return o.scroll;
|
|
295
|
-
}),
|
|
295
|
+
}), Re = s(() => {
|
|
296
296
|
var e;
|
|
297
297
|
if (o.tableLayout)
|
|
298
298
|
return o.tableLayout;
|
|
299
299
|
if ((e = o.columns) != null && e.some((r) => r.ellipsis))
|
|
300
300
|
return "fixed";
|
|
301
|
-
}),
|
|
301
|
+
}), q = s(() => {
|
|
302
302
|
var a;
|
|
303
|
-
const e =
|
|
303
|
+
const e = t(U), r = t(T);
|
|
304
304
|
return {
|
|
305
305
|
...o,
|
|
306
306
|
...e,
|
|
@@ -308,19 +308,19 @@ const No = /* @__PURE__ */ ze({
|
|
|
308
308
|
...r,
|
|
309
309
|
// tips 如果是前端分页,则默认会走缓存
|
|
310
310
|
preserveSelectedRowKeys: g(o.dataSource) ? r.preserveSelectedRowKeys : !0
|
|
311
|
-
} :
|
|
311
|
+
} : Xe(o.rowSelection),
|
|
312
312
|
loading: g(o.loading) ? e.loading : o.loading,
|
|
313
313
|
pagination: o.pagination === !1 ? !1 : e.pagination,
|
|
314
|
-
scroll:
|
|
314
|
+
scroll: t(ve)
|
|
315
315
|
};
|
|
316
|
-
}),
|
|
316
|
+
}), Ce = s(() => {
|
|
317
317
|
var e;
|
|
318
|
-
return [c(), o.card ? null : c("wrapper"), o.adaptive ? c("adaptive") : null, A.value && ((e = i.value) != null && e.visible) ?
|
|
318
|
+
return [c(), o.card ? null : c("wrapper"), o.adaptive ? c("adaptive") : null, A.value && ((e = i.value) != null && e.visible) ? ie(`sticky-${W === 0 ? "absolute" : "relative"}`) : null].filter(Boolean);
|
|
319
319
|
});
|
|
320
|
-
function
|
|
321
|
-
return
|
|
320
|
+
function Te(e, r, a) {
|
|
321
|
+
return re.includes(e.valueType) ? a : e.copyable || e.ellipsis ? p(no, {
|
|
322
322
|
copyable: e.copyable,
|
|
323
|
-
ellipsis: e.ellipsis ?
|
|
323
|
+
ellipsis: e.ellipsis ? je(e.ellipsis) ? {
|
|
324
324
|
tooltip: a,
|
|
325
325
|
rows: 1
|
|
326
326
|
} : {
|
|
@@ -330,36 +330,36 @@ const No = /* @__PURE__ */ ze({
|
|
|
330
330
|
content: a
|
|
331
331
|
}, null) : a;
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
Y(() => t(b).loading, (e) => {
|
|
334
334
|
var r;
|
|
335
335
|
(r = o.onLoadingChange) == null || r.call(o, e);
|
|
336
|
-
}),
|
|
337
|
-
|
|
336
|
+
}), Y(() => o.dataSource, (e) => {
|
|
337
|
+
Se(e);
|
|
338
338
|
}, {
|
|
339
339
|
immediate: !0
|
|
340
340
|
});
|
|
341
|
-
function
|
|
342
|
-
var r, a,
|
|
343
|
-
(
|
|
341
|
+
function Fe(e) {
|
|
342
|
+
var r, a, l;
|
|
343
|
+
(l = (a = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || l.call(a, e);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
var a,
|
|
345
|
+
function xe(e = !1) {
|
|
346
|
+
var a, l, d;
|
|
347
347
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
348
|
-
return (d = (
|
|
348
|
+
return (d = (l = (a = P.value) == null ? void 0 : a.apForm) == null ? void 0 : l[r]) == null ? void 0 : d.call(l, !0);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
return
|
|
350
|
+
function ke() {
|
|
351
|
+
return t(u);
|
|
352
352
|
}
|
|
353
|
-
return
|
|
354
|
-
submit: () =>
|
|
355
|
-
reset: () =>
|
|
356
|
-
refresh: () =>
|
|
357
|
-
setSearchFormValues:
|
|
358
|
-
getSearchFormValues:
|
|
359
|
-
getShownColumns:
|
|
360
|
-
dataSource: s(() =>
|
|
353
|
+
return de({
|
|
354
|
+
submit: () => _(),
|
|
355
|
+
reset: () => H(),
|
|
356
|
+
refresh: () => be(),
|
|
357
|
+
setSearchFormValues: Fe,
|
|
358
|
+
getSearchFormValues: xe,
|
|
359
|
+
getShownColumns: ke,
|
|
360
|
+
dataSource: s(() => t(b).records),
|
|
361
361
|
rowSelection: {
|
|
362
|
-
selectedRows: s(() =>
|
|
362
|
+
selectedRows: s(() => t(F)),
|
|
363
363
|
...x
|
|
364
364
|
},
|
|
365
365
|
scrollBar: {
|
|
@@ -378,20 +378,23 @@ const No = /* @__PURE__ */ ze({
|
|
|
378
378
|
}), (e, r) => (m(), k("div", {
|
|
379
379
|
ref_key: "tableWrapperRef",
|
|
380
380
|
ref: L,
|
|
381
|
-
class: y(
|
|
382
|
-
|
|
381
|
+
class: y(Ce.value),
|
|
382
|
+
style: I(t(ce)({
|
|
383
|
+
"scroll-bar-width": `${t(W)}px`
|
|
384
|
+
}))
|
|
385
|
+
}, [t(g)(e.dataSource) && e.searchForm !== !1 && j.value.length > 0 ? (m(), k("div", {
|
|
383
386
|
key: 0,
|
|
384
|
-
class: y(e.card ?
|
|
385
|
-
style:
|
|
386
|
-
}, [p(
|
|
387
|
+
class: y(e.card ? t(B)("search-wrapper") : null),
|
|
388
|
+
style: I(e.searchFormWrapperStyle)
|
|
389
|
+
}, [p(t(De).SearchForm, w(e.searchForm || {}, {
|
|
387
390
|
ref_key: "formRef",
|
|
388
391
|
ref: P,
|
|
389
392
|
"custom-reset": "",
|
|
390
|
-
"submit-loading":
|
|
391
|
-
onSubmit:
|
|
392
|
-
onReset:
|
|
393
|
-
}),
|
|
394
|
-
default: v(() => [(m(!0), k(
|
|
393
|
+
"submit-loading": t(U).loading,
|
|
394
|
+
onSubmit: t(_),
|
|
395
|
+
onReset: t(H)
|
|
396
|
+
}), Z({
|
|
397
|
+
default: v(() => [(m(!0), k(X, null, ee(j.value, (a) => (m(), oe(Ke(a.renderNode.Comp), w({
|
|
395
398
|
key: a.dataIndex,
|
|
396
399
|
item: a,
|
|
397
400
|
ref_for: !0
|
|
@@ -404,66 +407,66 @@ const No = /* @__PURE__ */ ze({
|
|
|
404
407
|
name: "extra",
|
|
405
408
|
fn: v(() => [R(e.$slots, "searchFormExtra")]),
|
|
406
409
|
key: "0"
|
|
407
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
410
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ae("", !0), E("div", {
|
|
408
411
|
ref_key: "contentRef",
|
|
409
|
-
ref:
|
|
410
|
-
class: y([
|
|
411
|
-
style:
|
|
412
|
-
}, [
|
|
413
|
-
class: y(
|
|
412
|
+
ref: pe,
|
|
413
|
+
class: y([t(B)("table-wrapper"), e.card ? t(B)("table-wrapper-card") : null]),
|
|
414
|
+
style: I(e.tableWrapperStyle)
|
|
415
|
+
}, [E("div", {
|
|
416
|
+
class: y(t(c)("header-wrapper"))
|
|
414
417
|
}, [e.settings ? (m(), k("div", {
|
|
415
418
|
key: 0,
|
|
416
|
-
class: y(
|
|
417
|
-
}, [
|
|
418
|
-
class: y(
|
|
419
|
+
class: y(t(c)("header"))
|
|
420
|
+
}, [E("div", {
|
|
421
|
+
class: y(t(O)("header", "title"))
|
|
419
422
|
}, [R(e.$slots, "title", w({
|
|
420
|
-
selectedRows:
|
|
421
|
-
selectedRowKeys:
|
|
423
|
+
selectedRows: t(F),
|
|
424
|
+
selectedRowKeys: t(T).selectedRowKeys,
|
|
422
425
|
shownColumns: u.value
|
|
423
|
-
}, x))], 2), C.title ? (m(),
|
|
426
|
+
}, x))], 2), C.title ? (m(), oe(t(Le), {
|
|
424
427
|
key: 0,
|
|
425
428
|
type: "vertical"
|
|
426
|
-
})) :
|
|
429
|
+
})) : ae("", !0), p(so, {
|
|
427
430
|
config: e.settings === !0 ? {} : e.settings
|
|
428
431
|
}, null, 8, ["config"])], 2)) : R(e.$slots, "title", w({
|
|
429
432
|
key: 1,
|
|
430
|
-
selectedRows:
|
|
431
|
-
selectedRowKeys:
|
|
433
|
+
selectedRows: t(F),
|
|
434
|
+
selectedRowKeys: t(T).selectedRowKeys,
|
|
432
435
|
shownColumns: u.value
|
|
433
|
-
}, x))], 2), p(
|
|
436
|
+
}, x))], 2), p(t($e), w({
|
|
434
437
|
ref_key: "antdTableRef",
|
|
435
|
-
ref:
|
|
436
|
-
class:
|
|
437
|
-
},
|
|
438
|
+
ref: $,
|
|
439
|
+
class: t(c)("table")
|
|
440
|
+
}, q.value, {
|
|
438
441
|
size: z.value,
|
|
439
|
-
"table-layout":
|
|
442
|
+
"table-layout": Re.value,
|
|
440
443
|
columns: u.value,
|
|
441
|
-
onResizeColumn: r[0] || (r[0] = (a,
|
|
442
|
-
}),
|
|
444
|
+
onResizeColumn: r[0] || (r[0] = (a, l) => l.width = a)
|
|
445
|
+
}), Z({
|
|
443
446
|
summary: v(() => [R(e.$slots, "summary", {
|
|
444
447
|
columns: u.value,
|
|
445
|
-
records:
|
|
446
|
-
selectedRows:
|
|
448
|
+
records: q.value.dataSource,
|
|
449
|
+
selectedRows: t(F)
|
|
447
450
|
})]),
|
|
448
451
|
_: 2
|
|
449
|
-
}, [
|
|
452
|
+
}, [t(A) ? {
|
|
450
453
|
name: "bottomPaginationTop",
|
|
451
454
|
fn: v(() => {
|
|
452
|
-
var a,
|
|
453
|
-
return [p(
|
|
455
|
+
var a, l;
|
|
456
|
+
return [p(t(uo), {
|
|
454
457
|
ref_key: "scrollBarRef",
|
|
455
458
|
ref: i,
|
|
456
|
-
"scroll-container": (
|
|
459
|
+
"scroll-container": (l = (a = $.value) == null ? void 0 : a.table) == null ? void 0 : l.scrollBodyRef,
|
|
457
460
|
direction: "horizontal"
|
|
458
461
|
}, null, 8, ["scroll-container"])];
|
|
459
462
|
}),
|
|
460
463
|
key: "0"
|
|
461
|
-
} : void 0,
|
|
462
|
-
name:
|
|
463
|
-
fn: v((d) => [R(e.$slots,
|
|
464
|
-
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)],
|
|
464
|
+
} : void 0, ee(t(te)(C, ["title", "searchFormExtra", "headerCell", "summary"]), (a, l) => ({
|
|
465
|
+
name: l,
|
|
466
|
+
fn: v((d) => [R(e.$slots, l, Oe(Ve(d || {})))])
|
|
467
|
+
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
|
|
465
468
|
}
|
|
466
469
|
});
|
|
467
470
|
export {
|
|
468
|
-
|
|
471
|
+
Io as default
|
|
469
472
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RecursivePartial } from '../type';
|
|
2
|
-
export declare const scrollbarSize: number;
|
|
3
2
|
declare const aplusCssVarObj: {
|
|
4
3
|
'ap-form': {
|
|
5
4
|
bordered: {
|
|
@@ -67,9 +66,6 @@ declare const aplusCssVarObj: {
|
|
|
67
66
|
color: {
|
|
68
67
|
primary: string;
|
|
69
68
|
};
|
|
70
|
-
scrollbar: {
|
|
71
|
-
size: string;
|
|
72
|
-
};
|
|
73
69
|
};
|
|
74
70
|
'ap-descriptions': {
|
|
75
71
|
item: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const l = F(), p = {
|
|
1
|
+
const F = {
|
|
3
2
|
"ap-form": {
|
|
4
3
|
bordered: {
|
|
5
4
|
"border-color": {
|
|
@@ -65,9 +64,6 @@ const l = F(), p = {
|
|
|
65
64
|
basic: {
|
|
66
65
|
color: {
|
|
67
66
|
primary: "#0070ff"
|
|
68
|
-
},
|
|
69
|
-
scrollbar: {
|
|
70
|
-
size: `${l}px`
|
|
71
67
|
}
|
|
72
68
|
},
|
|
73
69
|
"ap-descriptions": {
|
|
@@ -104,7 +100,7 @@ const l = F(), p = {
|
|
|
104
100
|
"color-disabled": "rgba(24, 41, 72, 0.25)"
|
|
105
101
|
}
|
|
106
102
|
}
|
|
107
|
-
},
|
|
103
|
+
}, b = {
|
|
108
104
|
"ap-form": {
|
|
109
105
|
bordered: {
|
|
110
106
|
"border-color": {
|
|
@@ -170,9 +166,6 @@ const l = F(), p = {
|
|
|
170
166
|
basic: {
|
|
171
167
|
color: {
|
|
172
168
|
primary: "#34b77c"
|
|
173
|
-
},
|
|
174
|
-
scrollbar: {
|
|
175
|
-
size: `${l}px`
|
|
176
169
|
}
|
|
177
170
|
},
|
|
178
171
|
"ap-descriptions": {
|
|
@@ -210,27 +203,26 @@ const l = F(), p = {
|
|
|
210
203
|
}
|
|
211
204
|
}
|
|
212
205
|
};
|
|
213
|
-
function
|
|
206
|
+
function i(t) {
|
|
214
207
|
const o = {};
|
|
215
|
-
function r(a,
|
|
216
|
-
const
|
|
217
|
-
for (const c of
|
|
218
|
-
const e = a[c],
|
|
219
|
-
e !== null && typeof e == "object" ? r(e,
|
|
208
|
+
function r(a, l) {
|
|
209
|
+
const s = Object.keys(a);
|
|
210
|
+
for (const c of s) {
|
|
211
|
+
const e = a[c], n = [...l, c];
|
|
212
|
+
e !== null && typeof e == "object" ? r(e, n) : o[`--${n.join("-")}`] = e;
|
|
220
213
|
}
|
|
221
214
|
}
|
|
222
215
|
return r(t, []), o;
|
|
223
216
|
}
|
|
224
|
-
const
|
|
225
|
-
function
|
|
217
|
+
const d = i(F), p = i(b);
|
|
218
|
+
function u(t) {
|
|
226
219
|
Object.entries(t).forEach(([o, r]) => {
|
|
227
220
|
document.documentElement.style.setProperty(o, r);
|
|
228
221
|
});
|
|
229
222
|
}
|
|
230
223
|
export {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
D as setCSSVariables
|
|
224
|
+
p as adminCssVar,
|
|
225
|
+
d as aplusCssVar,
|
|
226
|
+
i as generateCssVar,
|
|
227
|
+
u as setCSSVariables
|
|
236
228
|
};
|
|
@@ -228,9 +228,6 @@ export declare const APConfigProvider: {
|
|
|
228
228
|
color: {
|
|
229
229
|
primary: string;
|
|
230
230
|
};
|
|
231
|
-
scrollbar: {
|
|
232
|
-
size: string;
|
|
233
|
-
};
|
|
234
231
|
};
|
|
235
232
|
'ap-descriptions': {
|
|
236
233
|
item: {
|
|
@@ -380,9 +377,6 @@ export declare const APConfigProvider: {
|
|
|
380
377
|
color: {
|
|
381
378
|
primary: string;
|
|
382
379
|
};
|
|
383
|
-
scrollbar: {
|
|
384
|
-
size: string;
|
|
385
|
-
};
|
|
386
380
|
};
|
|
387
381
|
'ap-descriptions': {
|
|
388
382
|
item: {
|
|
@@ -637,9 +631,6 @@ export declare const APConfigProvider: {
|
|
|
637
631
|
color: {
|
|
638
632
|
primary: string;
|
|
639
633
|
};
|
|
640
|
-
scrollbar: {
|
|
641
|
-
size: string;
|
|
642
|
-
};
|
|
643
634
|
};
|
|
644
635
|
'ap-descriptions': {
|
|
645
636
|
item: {
|
|
@@ -789,9 +780,6 @@ export declare const APConfigProvider: {
|
|
|
789
780
|
color: {
|
|
790
781
|
primary: string;
|
|
791
782
|
};
|
|
792
|
-
scrollbar: {
|
|
793
|
-
size: string;
|
|
794
|
-
};
|
|
795
783
|
};
|
|
796
784
|
'ap-descriptions': {
|
|
797
785
|
item: {
|
|
@@ -1090,9 +1078,6 @@ export declare const APConfigProvider: {
|
|
|
1090
1078
|
color: {
|
|
1091
1079
|
primary: string;
|
|
1092
1080
|
};
|
|
1093
|
-
scrollbar: {
|
|
1094
|
-
size: string;
|
|
1095
|
-
};
|
|
1096
1081
|
};
|
|
1097
1082
|
'ap-descriptions': {
|
|
1098
1083
|
item: {
|
|
@@ -104,13 +104,15 @@ const e = {
|
|
|
104
104
|
cancel: "Cancel",
|
|
105
105
|
ticketsTitle: "Ticket Title",
|
|
106
106
|
noEmpty: "No empty",
|
|
107
|
-
pleaseEntry: "please enter",
|
|
107
|
+
pleaseEntry: "please enter (Within 300 words)",
|
|
108
108
|
ticketsType: "Ticket Type",
|
|
109
109
|
ticketsDetail: "Ticket Detail",
|
|
110
110
|
ticketsLevel: "Priority",
|
|
111
111
|
operationSuccess: "operate successfully",
|
|
112
112
|
fileSizeMax: "Single file size limit",
|
|
113
|
-
fileCountMax: "Limit the number to {x} at a time"
|
|
113
|
+
fileCountMax: "Limit the number to {x} at a time",
|
|
114
|
+
fileLabel: "File Upload"
|
|
115
|
+
// 上传附件
|
|
114
116
|
},
|
|
115
117
|
apTableModal: {
|
|
116
118
|
titleSuffixOne: "You can add up to {maxCount},",
|
|
@@ -113,13 +113,14 @@ const e = {
|
|
|
113
113
|
cancel: "取消",
|
|
114
114
|
ticketsTitle: "工单标题",
|
|
115
115
|
noEmpty: "不可为空",
|
|
116
|
-
pleaseEntry: "
|
|
116
|
+
pleaseEntry: "请输入(300字以内)",
|
|
117
117
|
ticketsType: "工单类型",
|
|
118
118
|
ticketsDetail: "工单详情",
|
|
119
119
|
ticketsLevel: "优先级",
|
|
120
120
|
operationSuccess: "操作成功",
|
|
121
121
|
fileSizeMax: "单个文件大小限制",
|
|
122
|
-
fileCountMax: "单次数量限制 {x} 个"
|
|
122
|
+
fileCountMax: "单次数量限制 {x} 个",
|
|
123
|
+
fileLabel: "上传附件"
|
|
123
124
|
},
|
|
124
125
|
apTableModal: {
|
|
125
126
|
titleSuffixOne: "最多可添加{maxCount}个,",
|
|
@@ -106,7 +106,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
|
|
|
106
106
|
readonly hideRequiredMark?: boolean | undefined;
|
|
107
107
|
readonly validateOnRuleChange?: boolean | undefined;
|
|
108
108
|
readonly scrollToFirstError?: boolean | Options<any> | undefined;
|
|
109
|
-
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
|
|
109
|
+
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: ** @type { typeof __VLS_ctx.formRef } */).FieldData[]) => void) | undefined;
|
|
110
110
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
111
111
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
112
112
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as T, ref as g, computed as F, openBlock as E, createElementBlock as N, createVNode as t, unref as e, mergeProps as
|
|
2
|
-
import { message as
|
|
1
|
+
import { defineComponent as T, ref as g, computed as F, openBlock as E, createElementBlock as N, createVNode as t, unref as e, mergeProps as L, withCtx as n, h as P } from "vue";
|
|
2
|
+
import { message as q, Modal as I, Input as A, Textarea as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ApForm as i } from "../ap-form/index.mjs";
|
|
4
4
|
import "./help-message.vue.mjs";
|
|
5
5
|
import "../ap-upload/index.mjs";
|
|
6
6
|
import { langMap as R, DictCode as w } from "./interfaces.mjs";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
8
|
import "../hooks/index.mjs";
|
|
9
|
-
import { useLocale as
|
|
9
|
+
import { useLocale as b } from "../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.mjs";
|
|
12
12
|
import { useControllableValue as D } from "../hooks/useControllableValue.mjs";
|
|
@@ -59,35 +59,35 @@ const pe = /* @__PURE__ */ T({
|
|
|
59
59
|
mousePosition: {}
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:open", "modalClose"],
|
|
62
|
-
setup(
|
|
63
|
-
const { t: o } =
|
|
62
|
+
setup(v, { emit: x }) {
|
|
63
|
+
const { t: o } = b(), { b: C } = $("work-order-modal"), m = x, d = g(), l = g(!1), s = v, O = z("api"), { lang: h } = b(), _ = F(() => R[h.value] ?? "zh_CN"), { value: c, updateValue: M } = D(s, m, {
|
|
64
64
|
valuePropName: "open",
|
|
65
65
|
defaultValue: !0
|
|
66
|
-
}),
|
|
66
|
+
}), u = async (r) => {
|
|
67
67
|
var p, k;
|
|
68
|
-
const a = await ((k = (p =
|
|
68
|
+
const a = await ((k = (p = O.value) == null ? void 0 : p.select) == null ? void 0 : k.call(p, {
|
|
69
69
|
dictCode: r,
|
|
70
70
|
locale: _.value
|
|
71
71
|
}));
|
|
72
72
|
return a == null ? void 0 : a.map((y) => ({ label: y.itemText, value: y.itemValue }));
|
|
73
|
-
},
|
|
73
|
+
}, B = async () => {
|
|
74
74
|
var r;
|
|
75
75
|
if (!l.value)
|
|
76
76
|
try {
|
|
77
77
|
l.value = !0;
|
|
78
|
-
const a = await ((r =
|
|
79
|
-
await s.api(a), l.value = !1,
|
|
78
|
+
const a = await ((r = d.value) == null ? void 0 : r.validateFields());
|
|
79
|
+
await s.api(a), l.value = !1, q.success("操作成功"), f();
|
|
80
80
|
} catch {
|
|
81
81
|
l.value = !1;
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
}, f = () => {
|
|
85
|
-
|
|
85
|
+
M(!1), c.value = !1, setTimeout(() => {
|
|
86
86
|
console.log(c.value);
|
|
87
87
|
}, 500), m("modalClose");
|
|
88
88
|
};
|
|
89
89
|
return (r, a) => (E(), N("div", null, [
|
|
90
|
-
t(e(
|
|
90
|
+
t(e(I), L(s, {
|
|
91
91
|
width: 600,
|
|
92
92
|
centered: !0,
|
|
93
93
|
open: e(c),
|
|
@@ -99,14 +99,14 @@ const pe = /* @__PURE__ */ T({
|
|
|
99
99
|
"wrap-class-name": e(C)(),
|
|
100
100
|
closable: !0,
|
|
101
101
|
"confirm-loading": l.value,
|
|
102
|
-
onOk:
|
|
102
|
+
onOk: B,
|
|
103
103
|
onCancel: f
|
|
104
104
|
}), {
|
|
105
105
|
default: n(() => [
|
|
106
106
|
t(e(i), {
|
|
107
107
|
ref_key: "formRef",
|
|
108
|
-
ref:
|
|
109
|
-
colon:
|
|
108
|
+
ref: d,
|
|
109
|
+
colon: ""
|
|
110
110
|
}, {
|
|
111
111
|
default: n(() => [
|
|
112
112
|
t(e(i).FormItem, {
|
|
@@ -129,7 +129,7 @@ const pe = /* @__PURE__ */ T({
|
|
|
129
129
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
|
|
130
130
|
field: {
|
|
131
131
|
placeholder: e(o)("ap.workOrderModal.pleaseEntry"),
|
|
132
|
-
request: () =>
|
|
132
|
+
request: () => u(e(w).TicketsType)
|
|
133
133
|
}
|
|
134
134
|
}, null, 8, ["label", "rules", "field"]),
|
|
135
135
|
t(e(i).FormItem, {
|
|
@@ -141,7 +141,7 @@ const pe = /* @__PURE__ */ T({
|
|
|
141
141
|
t(e(V), {
|
|
142
142
|
placeholder: e(o)("ap.workOrderModal.pleaseEntry"),
|
|
143
143
|
maxlength: 300,
|
|
144
|
-
"show-count": !
|
|
144
|
+
"show-count": !1
|
|
145
145
|
}, null, 8, ["placeholder"])
|
|
146
146
|
]),
|
|
147
147
|
_: 1
|
|
@@ -151,10 +151,13 @@ const pe = /* @__PURE__ */ T({
|
|
|
151
151
|
name: "ticketsLevel",
|
|
152
152
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
|
|
153
153
|
field: {
|
|
154
|
-
request: () =>
|
|
154
|
+
request: () => u(e(w).TicketsLevel)
|
|
155
155
|
}
|
|
156
156
|
}, null, 8, ["label", "rules", "field"]),
|
|
157
|
-
t(e(i).FormItem, {
|
|
157
|
+
t(e(i).FormItem, {
|
|
158
|
+
name: "files",
|
|
159
|
+
label: e(o)("ap.workOrderModal.fileLabel")
|
|
160
|
+
}, {
|
|
158
161
|
default: n(() => [
|
|
159
162
|
t(e(K), {
|
|
160
163
|
"dir-name": "WorkOrder",
|
|
@@ -167,11 +170,11 @@ const pe = /* @__PURE__ */ T({
|
|
|
167
170
|
accept: ".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx",
|
|
168
171
|
"max-count": 10,
|
|
169
172
|
"max-size": 50,
|
|
170
|
-
"sub-title":
|
|
173
|
+
"sub-title": P(U)
|
|
171
174
|
}, null, 8, ["get-oss-access", "sub-title"])
|
|
172
175
|
]),
|
|
173
176
|
_: 1
|
|
174
|
-
})
|
|
177
|
+
}, 8, ["label"])
|
|
175
178
|
]),
|
|
176
179
|
_: 1
|
|
177
180
|
}, 512)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=require("@aplus-frontend/antdv"),ie=require("@aplus-frontend/antdv/es/theme/internal"),fe=require("../ap-form/index.js"),U=require("./constants.js");require("../config-provider/index.js");const pe=require("./hooks/use-table-paging-ng.js"),c=require("lodash-unified"),s=require("./utils.js"),me=require("./hooks/use-table-content-height.js"),ye=require("./hooks/use-table-row-selection.js"),ge=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const Se=require("./context.js");require("../scroll-bar/index.js");const be=require("./hooks/use-sticky-scroll.js"),he=require("../config-provider/css-var.js"),we=require("../config-provider/hooks/use-namespace.js"),ve=require("../config-provider/hooks/use-global-config.js"),Ce=require("./components/paragraph-ellipsis/index.vue2.js"),Re=require("./components/setting/modal/index.vue2.js"),xe=require("../scroll-bar/index.vue.js"),ke=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(D,{expose:$}){const t=D;let x=0;const g=e.useSlots(),[,j]=ie.useToken(),{e:w,b:f,be:k,m:W}=we.useNamespace("ap-table"),T=ve.useGlobalConfig("valueTypeMap"),{height:H,contentRef:M}=me.default(),B=e.ref(),F=e.ref(),{isStickyMode:q,scrollBarRef:i}=be.useStickyScroll(B),v=e.ref(t.size),d=e.ref([]),z=e.ref([]);Se.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>z.value),size:e.computed(()=>v.value),updateColumns(r){d.value=r},updateSize(r){v.value=r},dataSource:e.computed(()=>e.unref(m).records)});const N=e.computed(()=>{var r,n,o;return x++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!U.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:x},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(T)),l}))||[]}),G=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),J=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),Q=e.computed(()=>c.isUndefined(t.dataSource)?m.records:t.dataSource),{rowSelection:S,selectedRows:b,...h}=ye.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:Q}),{formRef:C,submit:P,reset:_,tableProps:V,refresh:X,data:m,setDataSource:Y,getColumnSFConfig:Z}=pe.useTablePaging({async request(r){var o,a;if(!S.value.preserveSelectedRowKeys&&c.isUndefined(t.dataSource)&&h.clearAll(),!c.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:J,sortFields:G,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),ee=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:ge.isDef(l.resizable)?l.resizable:t.columnResizable,...c.omit(s.apColumnToColumn(l),["ellipsis"]),...Z(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,k("table-header","title"),g.headerCell,e.unref(j).colorPrimary),customRender({value:p,...y}){var K,L;const I=s.getTableRenderType(l),ue=s.getTableRenderProps({...l,valueType:I},{value:p,...y}),de=s.getTableCellRenderNode(I,ue,y.record,e.unref(T)),O=((K=l.renderText)==null?void 0:K.call(l,{value:p,...y}))||p,ce=l.renderText?e.createVNode(e.Fragment,null,[(L=l.renderText)==null?void 0:L.call(l,{value:p,...y})]):de;let R=ne(l,O,ce);return l.customRender&&(R=l.customRender({value:p,...y,column:l,originalNode:R,originalText:O})),R},children:n(l.children||[],u||l)}))}return n(r)};e.watchEffect(()=>{const r=ee();d.value=r,z.value=r});const re=e.computed(()=>{var n,o;if(t.adaptive&&(m.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(H),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),te=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),E=e.computed(()=>{var o;const r=e.unref(V),n=e.unref(S);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:c.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:c.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(re)}}),oe=e.computed(()=>{var r;return[f(),t.card?null:f("wrapper"),t.adaptive?f("adaptive"):null,q.value&&((r=i.value)!=null&&r.visible)?W(`sticky-${he.scrollbarSize===0?"absolute":"relative"}`):null].filter(Boolean)});function ne(r,n,o){return U.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(Ce.default,{copyable:r.copyable,ellipsis:r.ellipsis?c.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(m).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{Y(r)},{immediate:!0});function ae(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function le(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function se(){return e.unref(d)}return $({submit:()=>P(),reset:()=>_(),refresh:()=>X(),setSearchFormValues:ae,getSearchFormValues:le,getShownColumns:se,dataSource:e.computed(()=>e.unref(m).records),rowSelection:{selectedRows:e.computed(()=>e.unref(b)),...h},scrollBar:{x:{getCurrentScroll:()=>{var r;return((r=i==null?void 0:i.value)==null?void 0:r.currentScroll)??0},scroll:r=>{var n,o;return(o=(n=i==null?void 0:i.value)==null?void 0:n.scroll)==null?void 0:o.call(n,r)}},y:void 0}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:B,class:e.normalizeClass(oe.value)},[e.unref(c.isUndefined)(r.dataSource)&&r.searchForm!==!1&&N.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(fe.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(V).loading,onSubmit:e.unref(P),onReset:e.unref(_)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[g.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:M,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(k)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),g.title?(e.openBlock(),e.createBlock(e.unref(A.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(Re.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),e.createVNode(e.unref(A.Table),e.mergeProps({ref_key:"antdTableRef",ref:F,class:e.unref(f)("table")},E.value,{size:v.value,"table-layout":te.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:E.value.dataSource,selectedRows:e.unref(b)})]),_:2},[e.unref(q)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,a;return[e.createVNode(e.unref(xe.default),{ref_key:"scrollBarRef",ref:i,"scroll-container":(a=(o=F.value)==null?void 0:o.table)==null?void 0:a.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(c.omit)(g,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=ke;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),U=require("@aplus-frontend/antdv"),me=require("@aplus-frontend/antdv/es/theme/internal"),ye=require("../ap-form/index.js"),$=require("./constants.js");require("../config-provider/index.js");const ge=require("./hooks/use-table-paging-ng.js"),c=require("lodash-unified"),s=require("./utils.js"),Se=require("./hooks/use-table-content-height.js"),be=require("./hooks/use-table-row-selection.js"),D=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const he=require("./context.js");require("../scroll-bar/index.js");const we=require("./hooks/use-sticky-scroll.js"),ve=require("../config-provider/hooks/use-namespace.js"),Ce=require("../config-provider/hooks/use-global-config.js"),Re=require("./components/paragraph-ellipsis/index.vue2.js"),xe=require("./components/setting/modal/index.vue2.js"),ke=require("../scroll-bar/index.vue.js"),Te=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(j,{expose:W}){const t=j;let x=0;const g=e.useSlots(),[,H]=me.useToken(),{e:w,b:f,be:k,m:M,cssVar:G}=ve.useNamespace("ap-table"),T=Ce.useGlobalConfig("valueTypeMap"),{height:J,contentRef:Q}=Se.default(),B=e.ref(),F=e.ref(),{isStickyMode:z,scrollBarRef:i}=we.useStickyScroll(B),v=e.ref(t.size),d=e.ref([]),N=e.ref([]),q=D.getScrollbarSize();he.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>N.value),size:e.computed(()=>v.value),updateColumns(r){d.value=r},updateSize(r){v.value=r},dataSource:e.computed(()=>e.unref(m).records)});const P=e.computed(()=>{var r,n,o;return x++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!$.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:x},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(T)),l}))||[]}),X=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),Y=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),Z=e.computed(()=>c.isUndefined(t.dataSource)?m.records:t.dataSource),{rowSelection:S,selectedRows:b,...h}=be.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:Z}),{formRef:C,submit:_,reset:V,tableProps:E,refresh:ee,data:m,setDataSource:re,getColumnSFConfig:te}=ge.useTablePaging({async request(r){var o,a;if(!S.value.preserveSelectedRowKeys&&c.isUndefined(t.dataSource)&&h.clearAll(),!c.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:Y,sortFields:X,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),oe=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:D.isDef(l.resizable)?l.resizable:t.columnResizable,...c.omit(s.apColumnToColumn(l),["ellipsis"]),...te(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,k("table-header","title"),g.headerCell,e.unref(H).colorPrimary),customRender({value:p,...y}){var L,A;const O=s.getTableRenderType(l),ie=s.getTableRenderProps({...l,valueType:O},{value:p,...y}),fe=s.getTableCellRenderNode(O,ie,y.record,e.unref(T)),K=((L=l.renderText)==null?void 0:L.call(l,{value:p,...y}))||p,pe=l.renderText?e.createVNode(e.Fragment,null,[(A=l.renderText)==null?void 0:A.call(l,{value:p,...y})]):fe;let R=se(l,K,pe);return l.customRender&&(R=l.customRender({value:p,...y,column:l,originalNode:R,originalText:K})),R},children:n(l.children||[],u||l)}))}return n(r)};e.watchEffect(()=>{const r=oe();d.value=r,N.value=r});const ne=e.computed(()=>{var n,o;if(t.adaptive&&(m.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(J),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),ae=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),I=e.computed(()=>{var o;const r=e.unref(E),n=e.unref(S);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:c.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:c.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(ne)}}),le=e.computed(()=>{var r;return[f(),t.card?null:f("wrapper"),t.adaptive?f("adaptive"):null,z.value&&((r=i.value)!=null&&r.visible)?M(`sticky-${q===0?"absolute":"relative"}`):null].filter(Boolean)});function se(r,n,o){return $.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(Re.default,{copyable:r.copyable,ellipsis:r.ellipsis?c.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(m).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{re(r)},{immediate:!0});function ue(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function de(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function ce(){return e.unref(d)}return W({submit:()=>_(),reset:()=>V(),refresh:()=>ee(),setSearchFormValues:ue,getSearchFormValues:de,getShownColumns:ce,dataSource:e.computed(()=>e.unref(m).records),rowSelection:{selectedRows:e.computed(()=>e.unref(b)),...h},scrollBar:{x:{getCurrentScroll:()=>{var r;return((r=i==null?void 0:i.value)==null?void 0:r.currentScroll)??0},scroll:r=>{var n,o;return(o=(n=i==null?void 0:i.value)==null?void 0:n.scroll)==null?void 0:o.call(n,r)}},y:void 0}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:B,class:e.normalizeClass(le.value),style:e.normalizeStyle(e.unref(G)({"scroll-bar-width":`${e.unref(q)}px`}))},[e.unref(c.isUndefined)(r.dataSource)&&r.searchForm!==!1&&P.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(ye.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(E).loading,onSubmit:e.unref(_),onReset:e.unref(V)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[g.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:Q,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(k)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),g.title?(e.openBlock(),e.createBlock(e.unref(U.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(xe.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),e.createVNode(e.unref(U.Table),e.mergeProps({ref_key:"antdTableRef",ref:F,class:e.unref(f)("table")},I.value,{size:v.value,"table-layout":ae.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:I.value.dataSource,selectedRows:e.unref(b)})]),_:2},[e.unref(z)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,a;return[e.createVNode(e.unref(ke.default),{ref_key:"scrollBarRef",ref:i,"scroll-container":(a=(o=F.value)==null?void 0:o.table)==null?void 0:a.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(c.omit)(g,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],6))}});exports.default=Te;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RecursivePartial } from '../type';
|
|
2
|
-
export declare const scrollbarSize: number;
|
|
3
2
|
declare const aplusCssVarObj: {
|
|
4
3
|
'ap-form': {
|
|
5
4
|
bordered: {
|
|
@@ -67,9 +66,6 @@ declare const aplusCssVarObj: {
|
|
|
67
66
|
color: {
|
|
68
67
|
primary: string;
|
|
69
68
|
};
|
|
70
|
-
scrollbar: {
|
|
71
|
-
size: string;
|
|
72
|
-
};
|
|
73
69
|
};
|
|
74
70
|
'ap-descriptions': {
|
|
75
71
|
item: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b={"ap-form":{bordered:{"border-color":{base:"#DEE4ED",hover:"#66A9FF",active:"#66A9FF"},"shadow-color":"rgba(5, 155, 255, 0.1)"}},"ap-action":{color:{primary:{base:"#0070FF",hover:"#66A9FF"},success:"#2ED1A3",error:"#FF4D4F",warn:"#FFA940"}},"check-card":{outline:{color:"#E9EDF3"},hover:{outline:{color:"#0070FF"}},checked:{outline:{color:"#0070FF"},bg:"#0070FF"}},"ap-table":{header:{bg:"#F2F6F9"},pagination:{total:{color:"#526A90",count:{color:"#182948"}}},setting:{button:{color:"#8896B0"}}},"ap-batch-action":{color:{font:"#8896B0",active:"#0070FF",border:"#E9EDF3"}},basic:{color:{primary:"#0070ff"}},"ap-descriptions":{item:{"padding-bottom":"24px","label-width":"auto"},"last-row-item":{"padding-bottom":"0px"}},"ap-appendix":{area:{color:{border:"#DEE4ED",font:"#182948","font-hover":"#0070FF","font-disabled":"#ABB7CC",icon:"#ABB7CC"}}},"ap-upload-single":{color:{main:"#182948",sub:"#ABB7CC",border:"#DEE4ED",primary:"#0070FF"}},"batch-input-group":{trigger:{color:"#526a90","color-disabled":"rgba(24, 41, 72, 0.25)"}}},F={"ap-form":{bordered:{"border-color":{base:"#D9D9D9",hover:"#85D4B0",active:"#85D4B0"},"shadow-color":"rgba(11, 166, 66, 0.09)"}},"ap-action":{color:{primary:{base:"#1890FF",hover:"#5EB1FF"},success:"#52C41A",error:"#FF4D4F",warn:"#FAAD14"}},"check-card":{outline:{color:"#D9D9D9"},hover:{outline:{color:"#34B77C"}},checked:{outline:{color:"#34B77C"},bg:"#34B77C"}},"ap-table":{header:{bg:"#FAFAFA"},pagination:{total:{color:"#666666",count:{color:"#333333"}}},setting:{button:{color:"#999999"}}},"ap-batch-action":{color:{font:"#999999",active:"#34B77C",border:"#E9E9E9"}},basic:{color:{primary:"#34b77c"}},"ap-descriptions":{item:{"padding-bottom":"24px","label-width":"auto"},"last-row-item":{"padding-bottom":"0px"}},"ap-appendix":{area:{color:{border:"#D9D9D9",font:"#333333","font-hover":"#1890FF","font-disabled":"#BFBFBF",icon:"#BFBFBF"}}},"ap-upload-single":{color:{main:"#333333",sub:"#BFBFBF",border:"#D9D9D9",primary:"#34b77c"}},"batch-input-group":{trigger:{color:"#999999","color-disabled":"rgba(0, 0, 0, 0.25)"}}};function t(a){const o={};function r(c,s){const l=Object.keys(c);for(const n of l){const e=c[n],i=[...s,n];e!==null&&typeof e=="object"?r(e,i):o[`--${i.join("-")}`]=e}}return r(a,[]),o}const d=t(b),p=t(F);function u(a){Object.entries(a).forEach(([o,r])=>{document.documentElement.style.setProperty(o,r)})}exports.adminCssVar=p;exports.aplusCssVar=d;exports.generateCssVar=t;exports.setCSSVariables=u;
|
|
@@ -228,9 +228,6 @@ export declare const APConfigProvider: {
|
|
|
228
228
|
color: {
|
|
229
229
|
primary: string;
|
|
230
230
|
};
|
|
231
|
-
scrollbar: {
|
|
232
|
-
size: string;
|
|
233
|
-
};
|
|
234
231
|
};
|
|
235
232
|
'ap-descriptions': {
|
|
236
233
|
item: {
|
|
@@ -380,9 +377,6 @@ export declare const APConfigProvider: {
|
|
|
380
377
|
color: {
|
|
381
378
|
primary: string;
|
|
382
379
|
};
|
|
383
|
-
scrollbar: {
|
|
384
|
-
size: string;
|
|
385
|
-
};
|
|
386
380
|
};
|
|
387
381
|
'ap-descriptions': {
|
|
388
382
|
item: {
|
|
@@ -637,9 +631,6 @@ export declare const APConfigProvider: {
|
|
|
637
631
|
color: {
|
|
638
632
|
primary: string;
|
|
639
633
|
};
|
|
640
|
-
scrollbar: {
|
|
641
|
-
size: string;
|
|
642
|
-
};
|
|
643
634
|
};
|
|
644
635
|
'ap-descriptions': {
|
|
645
636
|
item: {
|
|
@@ -789,9 +780,6 @@ export declare const APConfigProvider: {
|
|
|
789
780
|
color: {
|
|
790
781
|
primary: string;
|
|
791
782
|
};
|
|
792
|
-
scrollbar: {
|
|
793
|
-
size: string;
|
|
794
|
-
};
|
|
795
783
|
};
|
|
796
784
|
'ap-descriptions': {
|
|
797
785
|
item: {
|
|
@@ -1090,9 +1078,6 @@ export declare const APConfigProvider: {
|
|
|
1090
1078
|
color: {
|
|
1091
1079
|
primary: string;
|
|
1092
1080
|
};
|
|
1093
|
-
scrollbar: {
|
|
1094
|
-
size: string;
|
|
1095
|
-
};
|
|
1096
1081
|
};
|
|
1097
1082
|
'ap-descriptions': {
|
|
1098
1083
|
item: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"en",ap:{common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More"},field:{startDateText:"Start date",endDateText:"End date",today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year",lastYear:"Last year",lastXDays:"Last {day} days"},apForm:{search:{search:"Search",reset:"Reset"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:" "},setting:{title:"Custom Table",selectAll:"Select All",unSelectAll:"Deselect All",selectAllTip:"Please select the columns to display in the table.",sizeSmall:"Small",sizeNormal:"Normal",selectCount:"Selected fields ({count})",reset:"Reset",fixToLeft:"Fixed on the left",fixToRight:"Fixed on the right",unFixed:"Not fixed",delete:"Delete"},paragraphEllipsis:{copy:"Copy",copySuccess:"Copied successfully"}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export Excel",exportSuccess:"The task has been submitted,please go to the download center to check the progress"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries",clear:"Clear",selected:"Selected"},apAttachment:{downloadall:"Download All",more:"More"},apSizeInput:{length:"Length",width:"Width",height:"Height"},apExpandAlert:{expand:"Expand",collapse:"Collapse"},apAppendix:{downloadAll:"Download All",downloadFile:"Download file",appendix:"Appendix"},apGroupSearch:{defaultPlaceholder:"Please input",all:"All",close:"Close",clear:"Clear",confirm:"Confirm",tokenSeparatorsPlaceholder:"A maximum of 200 entries can be entered in batches, separated by commas and newlines"},batchInputGroup:{popoverInputPlaceholder:"A maximum of 200 entries can be entered in batches, separated by newlines"},apSummary:{total:"Total"}}};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"en",ap:{common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More"},field:{startDateText:"Start date",endDateText:"End date",today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year",lastYear:"Last year",lastXDays:"Last {day} days"},apForm:{search:{search:"Search",reset:"Reset"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:" "},setting:{title:"Custom Table",selectAll:"Select All",unSelectAll:"Deselect All",selectAllTip:"Please select the columns to display in the table.",sizeSmall:"Small",sizeNormal:"Normal",selectCount:"Selected fields ({count})",reset:"Reset",fixToLeft:"Fixed on the left",fixToRight:"Fixed on the right",unFixed:"Not fixed",delete:"Delete"},paragraphEllipsis:{copy:"Copy",copySuccess:"Copied successfully"}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export Excel",exportSuccess:"The task has been submitted,please go to the download center to check the progress"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter (Within 300 words)",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time",fileLabel:"File Upload"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries",clear:"Clear",selected:"Selected"},apAttachment:{downloadall:"Download All",more:"More"},apSizeInput:{length:"Length",width:"Width",height:"Height"},apExpandAlert:{expand:"Expand",collapse:"Collapse"},apAppendix:{downloadAll:"Download All",downloadFile:"Download file",appendix:"Appendix"},apGroupSearch:{defaultPlaceholder:"Please input",all:"All",close:"Close",clear:"Clear",confirm:"Confirm",tokenSeparatorsPlaceholder:"A maximum of 200 entries can be entered in batches, separated by commas and newlines"},batchInputGroup:{popoverInputPlaceholder:"A maximum of 200 entries can be entered in batches, separated by newlines"},apSummary:{total:"Total"}}};exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"zh-cn",ap:{common:{okText:"确认",cancelText:"取消",resetText:"重置",queryText:"查询",expandText:"展开",closeText:"收起",inputText:"请输入",chooseText:"请选择",redo:"刷新",back:"返回",more:"更多"},field:{startDateText:"开始日期",endDateText:"结束日期",today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",thisMonth:"本月",lastMonth:"上月",thisYear:"今年",lastYear:"去年",lastXDays:"近{day}天"},modal:{restore:"还原",maximize:"最大化",close:"关闭"},countdown:{normalText:"获取验证码",sendText:"{sec}秒后重新获取"},apForm:{search:{search:"查询",reset:"重置"}},apTable:{pagination:{totalLeftPrefix:"共",totalLeftSuffix:"条记录",totalRightPrefix:"第",totalRightSuffix:"页"},setting:{title:"自定义表格",selectAll:"全选",unSelectAll:"取消全选",selectAllTip:"请选择需要展示在表格的字段",sizeSmall:"紧凑",sizeNormal:"正常",selectCount:"已选字段({count})",reset:"重置",fixToLeft:"固定在左侧",fixToRight:"固定在右侧",unFixed:"不固定",delete:"删除"},paragraphEllipsis:{copy:"复制",copySuccess:"复制成功"}},apUpload:{update:"上传",pictureType:"图片类型",videoType:"视频类型",audioType:"音频类型",documentType:"文档类型",allTypes:"全部类型",networkAnomaly:"网络异常",FailedToObtainOssTemporaryPermissions:"获取oss临时权限失败",pleasePass:"请传入",supportExtension:"支持扩展名",uploadFile:"上传文件",fileInitializationException:"文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",maxUploadFiles:"最多上传{maxCount}个文件",maxUploadPicture:"最多上传{maxCount}张图片",maxUploadFileSize:"文件大小不超过{maxSize}MB",maxWarnUploadFileSize:"文件大小小于{maxSize}MB",maxUploadPictureSize:"图片大小小于{maxSize}MB",fileFormatNotSupported:"不支持该格式的文件",pictureFormatNotSupported:"不支持该格式的图片",imageParsingFailed:"图片解析失败",clickOrDragUpload:"点击或将文件拖拽到这里上传",foldersNotSupported:"不支持上传文件夹"},apExportGroup:{exportError:"导出失败",exportSelected:"导出所选",exportAll:"导出全部",export:"导出Excel",exportSuccess:"任务已提交,前往下载中心查看进度"},apBatchAction:{selected:"已选",piecesOfData:"条数据",empty:"清空"},apApBatchActionGroup:{batchOperation:"批量操作"},workOrderModal:{createTickets:"创建工单",submit:"确定",cancel:"取消",ticketsTitle:"工单标题",noEmpty:"不可为空",pleaseEntry:"
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"zh-cn",ap:{common:{okText:"确认",cancelText:"取消",resetText:"重置",queryText:"查询",expandText:"展开",closeText:"收起",inputText:"请输入",chooseText:"请选择",redo:"刷新",back:"返回",more:"更多"},field:{startDateText:"开始日期",endDateText:"结束日期",today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",thisMonth:"本月",lastMonth:"上月",thisYear:"今年",lastYear:"去年",lastXDays:"近{day}天"},modal:{restore:"还原",maximize:"最大化",close:"关闭"},countdown:{normalText:"获取验证码",sendText:"{sec}秒后重新获取"},apForm:{search:{search:"查询",reset:"重置"}},apTable:{pagination:{totalLeftPrefix:"共",totalLeftSuffix:"条记录",totalRightPrefix:"第",totalRightSuffix:"页"},setting:{title:"自定义表格",selectAll:"全选",unSelectAll:"取消全选",selectAllTip:"请选择需要展示在表格的字段",sizeSmall:"紧凑",sizeNormal:"正常",selectCount:"已选字段({count})",reset:"重置",fixToLeft:"固定在左侧",fixToRight:"固定在右侧",unFixed:"不固定",delete:"删除"},paragraphEllipsis:{copy:"复制",copySuccess:"复制成功"}},apUpload:{update:"上传",pictureType:"图片类型",videoType:"视频类型",audioType:"音频类型",documentType:"文档类型",allTypes:"全部类型",networkAnomaly:"网络异常",FailedToObtainOssTemporaryPermissions:"获取oss临时权限失败",pleasePass:"请传入",supportExtension:"支持扩展名",uploadFile:"上传文件",fileInitializationException:"文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",maxUploadFiles:"最多上传{maxCount}个文件",maxUploadPicture:"最多上传{maxCount}张图片",maxUploadFileSize:"文件大小不超过{maxSize}MB",maxWarnUploadFileSize:"文件大小小于{maxSize}MB",maxUploadPictureSize:"图片大小小于{maxSize}MB",fileFormatNotSupported:"不支持该格式的文件",pictureFormatNotSupported:"不支持该格式的图片",imageParsingFailed:"图片解析失败",clickOrDragUpload:"点击或将文件拖拽到这里上传",foldersNotSupported:"不支持上传文件夹"},apExportGroup:{exportError:"导出失败",exportSelected:"导出所选",exportAll:"导出全部",export:"导出Excel",exportSuccess:"任务已提交,前往下载中心查看进度"},apBatchAction:{selected:"已选",piecesOfData:"条数据",empty:"清空"},apApBatchActionGroup:{batchOperation:"批量操作"},workOrderModal:{createTickets:"创建工单",submit:"确定",cancel:"取消",ticketsTitle:"工单标题",noEmpty:"不可为空",pleaseEntry:"请输入(300字以内)",ticketsType:"工单类型",ticketsDetail:"工单详情",ticketsLevel:"优先级",operationSuccess:"操作成功",fileSizeMax:"单个文件大小限制",fileCountMax:"单次数量限制 {x} 个",fileLabel:"上传附件"},apTableModal:{titleSuffixOne:"最多可添加{maxCount}个,",titleSuffixTwo:"已添加",titleSuffixThree:"个",messageMaxCount:"最多选择{maxCount}条数据",clear:"清空",selected:"已选"},apAttachment:{downloadall:"下载全部",more:"更多"},apSizeInput:{length:"长",width:"宽",height:"高"},apExpandAlert:{expand:"展开",collapse:"收起"},apAppendix:{downloadAll:"下载全部",downloadFile:"下载文件",appendix:"附件"},apGroupSearch:{defaultPlaceholder:"请输入",all:"全部",close:"关闭",clear:"清空",confirm:"确定",tokenSeparatorsPlaceholder:"支持批量输入,可用逗号、换行符号分隔,最多输入200条"},batchInputGroup:{popoverInputPlaceholder:"支持批量输入,可用换行符分隔,最多输入200条"},apSummary:{total:"合计"}}};exports.default=e;
|
|
@@ -106,7 +106,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
|
|
|
106
106
|
readonly hideRequiredMark?: boolean | undefined;
|
|
107
107
|
readonly validateOnRuleChange?: boolean | undefined;
|
|
108
108
|
readonly scrollToFirstError?: boolean | Options<any> | undefined;
|
|
109
|
-
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
|
|
109
|
+
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: ** @type { typeof __VLS_ctx.formRef } */).FieldData[]) => void) | undefined;
|
|
110
110
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
111
111
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
112
112
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),s=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const i=require("./interfaces.js");require("../config-provider/index.js");require("../hooks/index.js");const _=require("../config-provider/hooks/use-locale.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),s=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const i=require("./interfaces.js");require("../config-provider/index.js");require("../hooks/index.js");const _=require("../config-provider/hooks/use-locale.js"),q=require("../config-provider/hooks/use-namespace.js"),M=require("../config-provider/hooks/use-global-config.js"),F=require("../hooks/useControllableValue.js"),N=require("../ap-form/items/select/index.vue.js"),T=require("../ap-form/items/radio/index.vue.js"),B=require("../ap-upload/apUpload.vue.js"),V=require("./help-message.vue2.js"),L=e.defineComponent({__name:"work-order-modal",props:{api:{type:Function},getOssAccess:{},prefixCls:{},visible:{type:Boolean},open:{type:Boolean},confirmLoading:{type:Boolean},title:{},closable:{type:Boolean},closeIcon:{},onOk:{type:Function},onCancel:{type:Function},"onUpdate:visible":{type:Function},"onUpdate:open":{type:Function},onChange:{type:Function},afterClose:{type:Function},centered:{type:Boolean},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean},forceRender:{type:Boolean},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function]},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean},keyboard:{type:Boolean},wrapProps:{},focusTriggerAfterClose:{type:Boolean},modalRender:{type:Function},mousePosition:{}},emits:["update:open","modalClose"],setup(g,{emit:v}){const{t}=_.useLocale(),{b:w}=q.useNamespace("work-order-modal"),p=v,d=e.ref(),a=e.ref(!1),l=g,b=M.useGlobalConfig("api"),{lang:C}=_.useLocale(),x=e.computed(()=>i.langMap[C.value]??"zh_CN"),{value:c,updateValue:h}=F.useControllableValue(l,p,{valuePropName:"open",defaultValue:!0}),f=async o=>{var n,k;const r=await((k=(n=b.value)==null?void 0:n.select)==null?void 0:k.call(n,{dictCode:o,locale:x.value}));return r==null?void 0:r.map(y=>({label:y.itemText,value:y.itemValue}))},O=async()=>{var o;if(!a.value)try{a.value=!0;const r=await((o=d.value)==null?void 0:o.validateFields());await l.api(r),a.value=!1,u.message.success("操作成功"),m()}catch{a.value=!1;return}},m=()=>{h(!1),c.value=!1,setTimeout(()=>{console.log(c.value)},500),p("modalClose")};return(o,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(u.Modal),e.mergeProps(l,{width:600,centered:!0,open:e.unref(c),title:e.unref(t)("ap.workOrderModal.createTickets"),"ok-text":e.unref(t)("ap.workOrderModal.submit"),"cancel-text":e.unref(t)("ap.workOrderModal.cancel"),mask:!0,"mask-closable":!0,"wrap-class-name":e.unref(w)(),closable:!0,"confirm-loading":a.value,onOk:O,onCancel:m}),{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm),{ref_key:"formRef",ref:d,colon:""},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsTitle"),name:"ticketsTitle",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Input),{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),maxlength:50,"show-count":!0},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(N.default),{label:e.unref(t)("ap.workOrderModal.ticketsType"),name:"ticketsType",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),request:()=>f(e.unref(i.DictCode).TicketsType)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsDetail"),name:"ticketsContent",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Textarea),{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),maxlength:300,"show-count":!1},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(T.default),{label:e.unref(t)("ap.workOrderModal.ticketsLevel"),name:"ticketsLevel",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{request:()=>f(e.unref(i.DictCode).TicketsLevel)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{name:"files",label:e.unref(t)("ap.workOrderModal.fileLabel")},{default:e.withCtx(()=>[e.createVNode(e.unref(B.default),{"dir-name":"WorkOrder","get-oss-access":l.getOssAccess,type:"multipleFile","need-name":{pathKey:"filePath",nameKey:"fileName"},accept:".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx","max-count":10,"max-size":50,"sub-title":e.h(V.default)},null,8,["get-oss-access","sub-title"])]),_:1},8,["label"])]),_:1},512)]),_:1},16,["open","title","ok-text","cancel-text","wrap-class-name","confirm-loading"])]))}});exports.default=L;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
67
67
|
"vuedraggable": "^4.1.0",
|
|
68
68
|
"@aplus-frontend/hooks": "1.0.7",
|
|
69
|
-
"@aplus-frontend/utils": "1.0.
|
|
69
|
+
"@aplus-frontend/utils": "1.0.51"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@aplus-frontend/antdv": "^1.0.12",
|
|
@@ -432,6 +432,52 @@
|
|
|
432
432
|
font-size: 14px;
|
|
433
433
|
display: inline-flex;
|
|
434
434
|
}
|
|
435
|
+
.aplus-scroll-bar {
|
|
436
|
+
position: relative;
|
|
437
|
+
}
|
|
438
|
+
.aplus-scroll-bar--horizontal {
|
|
439
|
+
width: 100%;
|
|
440
|
+
height: var(--aplus-scroll-bar-track-width, 10px);
|
|
441
|
+
}
|
|
442
|
+
.aplus-scroll-bar--vertical {
|
|
443
|
+
width: var(--aplus-scroll-bar-track-width, 10px);
|
|
444
|
+
height: 100%;
|
|
445
|
+
}
|
|
446
|
+
.aplus-scroll-bar__track {
|
|
447
|
+
position: absolute;
|
|
448
|
+
width: 100%;
|
|
449
|
+
height: 100%;
|
|
450
|
+
top: 0;
|
|
451
|
+
inset-inline-start: 0;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
|
|
454
|
+
}
|
|
455
|
+
.aplus-scroll-bar__track--disabled {
|
|
456
|
+
pointer-events: none;
|
|
457
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
458
|
+
}
|
|
459
|
+
.aplus-scroll-bar__track--hidden {
|
|
460
|
+
pointer-events: none;
|
|
461
|
+
background-color: transparent;
|
|
462
|
+
}
|
|
463
|
+
.aplus-scroll-bar__bar {
|
|
464
|
+
position: absolute;
|
|
465
|
+
border-radius: var(--aplus-scroll-bar-bar-width, 8px);
|
|
466
|
+
background-color: var(--aplus-scroll-bar-bar-color, #c7c8cc);
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
}
|
|
469
|
+
.aplus-scroll-bar__bar--disabled {
|
|
470
|
+
pointer-events: none;
|
|
471
|
+
box-shadow: none;
|
|
472
|
+
}
|
|
473
|
+
.aplus-scroll-bar__bar--horizontal {
|
|
474
|
+
height: var(--aplus-scroll-bar-bar-width, 8px);
|
|
475
|
+
top: calc(var(--aplus-scroll-bar-track-width, 10px) / 2 - var(--aplus-scroll-bar-bar-width, 8px) / 2);
|
|
476
|
+
}
|
|
477
|
+
.aplus-scroll-bar__bar--vertical {
|
|
478
|
+
width: var(--aplus-scroll-bar-bar-width, 8px);
|
|
479
|
+
left: calc(var(--aplus-scroll-bar-track-width, 10px) / 2 - var(--aplus-scroll-bar-bar-width, 8px) / 2);
|
|
480
|
+
}
|
|
435
481
|
.aplus-ap-table-wrapper {
|
|
436
482
|
padding: 16px;
|
|
437
483
|
background-color: #fff;
|
|
@@ -567,8 +613,8 @@
|
|
|
567
613
|
color: unset;
|
|
568
614
|
}
|
|
569
615
|
.aplus-ap-table--sticky-relative .ant-table-container > div:last-child {
|
|
570
|
-
margin-bottom: calc(var(--
|
|
571
|
-
clip-path: inset(0 0 var(--
|
|
616
|
+
margin-bottom: calc(var(--aplus-ap-table-scroll-bar-width) * -1);
|
|
617
|
+
clip-path: inset(0 0 var(--aplus-ap-table-scroll-bar-width) 0);
|
|
572
618
|
}
|
|
573
619
|
.aplus-ap-table--sticky-absolute .ant-table-container > div:last-child {
|
|
574
620
|
padding-bottom: 15px;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../mixins/mixins.less';
|
|
2
|
+
@import '../mixins/config.less';
|
|
2
3
|
@import './ap-table-index.less';
|
|
3
4
|
@import './ap-table-pagination.less';
|
|
4
5
|
@import './setting/index.less';
|
|
@@ -8,6 +9,9 @@
|
|
|
8
9
|
@import '../ap-field/index.less';
|
|
9
10
|
@import '../ap-action/item.less';
|
|
10
11
|
@import '../ap-action/item-dropdown.less';
|
|
12
|
+
@import '../scroll-bar/index.less';
|
|
13
|
+
|
|
14
|
+
@sw: ~'--@{ns}-ap-table-scroll-bar-width';
|
|
11
15
|
|
|
12
16
|
.b(ap-table, {
|
|
13
17
|
&-wrapper {
|
|
@@ -161,8 +165,8 @@
|
|
|
161
165
|
&--sticky-relative {
|
|
162
166
|
.ant-table-container{
|
|
163
167
|
& > div:last-child {
|
|
164
|
-
margin-bottom: calc(var(
|
|
165
|
-
clip-path: inset(0 0 var(
|
|
168
|
+
margin-bottom: calc(var(@sw) * -1);
|
|
169
|
+
clip-path: inset(0 0 var(@sw) 0);
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -432,6 +432,52 @@
|
|
|
432
432
|
font-size: 14px;
|
|
433
433
|
display: inline-flex;
|
|
434
434
|
}
|
|
435
|
+
.aplus-scroll-bar {
|
|
436
|
+
position: relative;
|
|
437
|
+
}
|
|
438
|
+
.aplus-scroll-bar--horizontal {
|
|
439
|
+
width: 100%;
|
|
440
|
+
height: var(--aplus-scroll-bar-track-width, 10px);
|
|
441
|
+
}
|
|
442
|
+
.aplus-scroll-bar--vertical {
|
|
443
|
+
width: var(--aplus-scroll-bar-track-width, 10px);
|
|
444
|
+
height: 100%;
|
|
445
|
+
}
|
|
446
|
+
.aplus-scroll-bar__track {
|
|
447
|
+
position: absolute;
|
|
448
|
+
width: 100%;
|
|
449
|
+
height: 100%;
|
|
450
|
+
top: 0;
|
|
451
|
+
inset-inline-start: 0;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
|
|
454
|
+
}
|
|
455
|
+
.aplus-scroll-bar__track--disabled {
|
|
456
|
+
pointer-events: none;
|
|
457
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
458
|
+
}
|
|
459
|
+
.aplus-scroll-bar__track--hidden {
|
|
460
|
+
pointer-events: none;
|
|
461
|
+
background-color: transparent;
|
|
462
|
+
}
|
|
463
|
+
.aplus-scroll-bar__bar {
|
|
464
|
+
position: absolute;
|
|
465
|
+
border-radius: var(--aplus-scroll-bar-bar-width, 8px);
|
|
466
|
+
background-color: var(--aplus-scroll-bar-bar-color, #c7c8cc);
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
}
|
|
469
|
+
.aplus-scroll-bar__bar--disabled {
|
|
470
|
+
pointer-events: none;
|
|
471
|
+
box-shadow: none;
|
|
472
|
+
}
|
|
473
|
+
.aplus-scroll-bar__bar--horizontal {
|
|
474
|
+
height: var(--aplus-scroll-bar-bar-width, 8px);
|
|
475
|
+
top: calc(var(--aplus-scroll-bar-track-width, 10px) / 2 - var(--aplus-scroll-bar-bar-width, 8px) / 2);
|
|
476
|
+
}
|
|
477
|
+
.aplus-scroll-bar__bar--vertical {
|
|
478
|
+
width: var(--aplus-scroll-bar-bar-width, 8px);
|
|
479
|
+
left: calc(var(--aplus-scroll-bar-track-width, 10px) / 2 - var(--aplus-scroll-bar-bar-width, 8px) / 2);
|
|
480
|
+
}
|
|
435
481
|
.aplus-ap-table-wrapper {
|
|
436
482
|
padding: 16px;
|
|
437
483
|
background-color: #fff;
|
|
@@ -567,8 +613,8 @@
|
|
|
567
613
|
color: unset;
|
|
568
614
|
}
|
|
569
615
|
.aplus-ap-table--sticky-relative .ant-table-container > div:last-child {
|
|
570
|
-
margin-bottom: calc(var(--
|
|
571
|
-
clip-path: inset(0 0 var(--
|
|
616
|
+
margin-bottom: calc(var(--aplus-ap-table-scroll-bar-width) * -1);
|
|
617
|
+
clip-path: inset(0 0 var(--aplus-ap-table-scroll-bar-width) 0);
|
|
572
618
|
}
|
|
573
619
|
.aplus-ap-table--sticky-absolute .ant-table-container > div:last-child {
|
|
574
620
|
padding-bottom: 15px;
|
package/theme/index.css
CHANGED
|
@@ -1158,8 +1158,8 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
|
|
|
1158
1158
|
color: unset;
|
|
1159
1159
|
}
|
|
1160
1160
|
.aplus-ap-table--sticky-relative .ant-table-container > div:last-child {
|
|
1161
|
-
margin-bottom: calc(var(--
|
|
1162
|
-
clip-path: inset(0 0 var(--
|
|
1161
|
+
margin-bottom: calc(var(--aplus-ap-table-scroll-bar-width) * -1);
|
|
1162
|
+
clip-path: inset(0 0 var(--aplus-ap-table-scroll-bar-width) 0);
|
|
1163
1163
|
}
|
|
1164
1164
|
.aplus-ap-table--sticky-absolute .ant-table-container > div:last-child {
|
|
1165
1165
|
padding-bottom: 15px;
|