@web-utils/form-ui 1.0.0-beta36 → 1.0.0-beta38
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/chunks/{BLWwTutr.mjs → B3ajWLh3.mjs} +15 -33
- package/chunks/{Cr1vBYne.mjs → BH_JJ8Xh.mjs} +15 -15
- package/chunks/{DistOy_O.mjs → BWBHzD5N.mjs} +28 -19
- package/chunks/{DQJyNm1V.mjs → Bd1UFJic.mjs} +135 -131
- package/chunks/{DcbnHU8K.mjs → BsCS7SB5.mjs} +19 -23
- package/chunks/{BTS_zTkz.mjs → BufIRDd0.mjs} +35 -39
- package/chunks/C1AgOUe_.mjs +172 -0
- package/chunks/C3Uo82-I.mjs +35 -0
- package/chunks/C9dGL28n.mjs +56 -0
- package/chunks/{A3sHIRQ_.mjs → CFOGMFgo.mjs} +22 -45
- package/chunks/{ZXCLnZFa.mjs → CLPSCSsy.mjs} +111 -144
- package/chunks/{D7hD-ppq.mjs → CSyJ-vEx.mjs} +1 -1
- package/chunks/CTKmEf2M.mjs +93 -0
- package/chunks/{DFsI7Y6h.mjs → CXvGoZKJ.mjs} +12 -11
- package/chunks/{Dgyjc3LT.mjs → Cab-ZjRx.mjs} +29 -45
- package/chunks/Cj59E77g.mjs +230 -0
- package/chunks/Cj5h2Wda.mjs +32 -0
- package/chunks/{iWQD3xvX.mjs → CqTcEefA.mjs} +14 -16
- package/chunks/{axr9InkL.mjs → Ct5bDJ50.mjs} +9 -13
- package/chunks/{D5_ctQqL.mjs → CuG2Q-PM.mjs} +2 -2
- package/chunks/{CLn0r4lV.mjs → D8UVq1t1.mjs} +16 -17
- package/chunks/{BYAy19s4.mjs → DJe97Fgi.mjs} +2 -8
- package/chunks/{Buc52aVh.mjs → DXYgAmil.mjs} +12 -29
- package/chunks/{DQxPzCsy.mjs → DhtHh0jk.mjs} +14 -15
- package/chunks/{CGJkMYZ4.mjs → DiJyms_r.mjs} +12 -20
- package/chunks/{1cDNhlSV.mjs → TvNHGVAP.mjs} +2 -2
- package/chunks/{CNskrN5I.mjs → XCGWTz41.mjs} +2 -2
- package/chunks/{DQKi5eEl.mjs → XqRTtFfp.mjs} +2 -2
- package/chunks/{BX-cVxlK.mjs → cmuHpsX6.mjs} +21 -14
- package/chunks/{DJKE5P39.mjs → o6VhYAN52.mjs} +2 -2
- package/chunks/{BwdWZEjT.mjs → pdwFQpA8.mjs} +13 -18
- package/chunks/{_dm2lLNL.mjs → taicx2sd.mjs} +2 -2
- package/constants/index.d.ts +16 -5
- package/editable-tree/index.d.ts +1 -1
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +1 -1
- package/element-dialog/index.mjs +1 -1
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +0 -14
- package/form-cascader/index.mjs +1 -1
- package/form-check-box-group/index.d.ts +0 -2
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +36 -10
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +2 -6
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +2 -14
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +9 -26
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +9 -2
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +9 -2
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +0 -6
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +9 -2
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +0 -2
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +0 -2
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +0 -14
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +1 -5
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +0 -2
- package/form-switch/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +370 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/helper/dictionary.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/index.d.ts +4 -1
- package/index.mjs +46 -43
- package/package.json +1 -1
- package/pageable-table/index.d.ts +0 -38
- package/pageable-table/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +6 -6
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +4 -3
- package/year-calendar/index.mjs +1 -1
- package/chunks/BLRY0zkF.mjs +0 -51
- package/chunks/BvsmTC3G.mjs +0 -229
- /package/chunks/{CnAEuI_c.mjs → ChmDDqoZ2.mjs} +0 -0
- /package/chunks/{BW6iY7Q7.mjs → DDmQcNm6.mjs} +0 -0
- /package/chunks/{DiE4GJtU.mjs → Ds_Tpa_M.mjs} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { n as e, u as t } from "./
|
|
1
|
+
import { n as e, u as t } from "./cmuHpsX6.mjs";
|
|
2
2
|
import { getDictLabel as n } from "../helper/dictionary.mjs";
|
|
3
3
|
import { pageableTableContextKey as r } from "../constants/index.mjs";
|
|
4
4
|
import i from "../resize-observer/index.mjs";
|
|
5
|
-
import { t as a } from "./
|
|
5
|
+
import { t as a } from "./CuG2Q-PM.mjs";
|
|
6
6
|
import { useVisibilityChange as o } from "../hook/useVisibilityChange.mjs";
|
|
7
7
|
import { hasOwn as s } from "@web-utils/core";
|
|
8
|
-
import { Fragment as c, computed as l, createBlock as u, createTextVNode as d, createVNode as f,
|
|
9
|
-
import { ElMessage as
|
|
10
|
-
import { ElButton as
|
|
11
|
-
import { useEventBus as
|
|
8
|
+
import { Fragment as c, computed as l, createBlock as u, createTextVNode as d, createVNode as f, inject as p, mergeModels as m, mergeProps as h, nextTick as ee, onBeforeUpdate as te, onUpdated as g, openBlock as _, provide as ne, reactive as v, ref as y, toDisplayString as b, useModel as x, watch as S, withCtx as C } from "vue";
|
|
9
|
+
import { ElMessage as re } from "element-plus";
|
|
10
|
+
import { ElButton as ie, ElCheckbox as w, ElDrawer as T, ElEmpty as ae, ElPagination as E, ElRadio as D, ElTable as O, ElTableColumn as k } from "element-plus/es";
|
|
11
|
+
import { useEventBus as A } from "@web-utils/vue/hooks/useEventBus";
|
|
12
12
|
//#region src/components/table/components/TableColumnFilter.vue
|
|
13
|
-
var
|
|
13
|
+
var j = {
|
|
14
14
|
__name: "TableColumnFilter",
|
|
15
|
-
props: /* @__PURE__ */
|
|
15
|
+
props: /* @__PURE__ */ m({ columns: {
|
|
16
16
|
type: Array,
|
|
17
17
|
default: () => []
|
|
18
18
|
} }, {
|
|
@@ -24,7 +24,7 @@ var ae = {
|
|
|
24
24
|
}),
|
|
25
25
|
emits: ["update:modelValue"],
|
|
26
26
|
setup(e, { expose: t }) {
|
|
27
|
-
let n =
|
|
27
|
+
let n = x(e, "modelValue"), r = v({}), i = v({}), a = v({}), o = v({}), s = (e, t, n) => {
|
|
28
28
|
n === "hide" ? r[t.prop] = e : n === "fixed" ? i[t.prop] = e : n === "filterable" ? a[t.prop] = e : n === "sortable" && (o[t.prop] = e);
|
|
29
29
|
};
|
|
30
30
|
return t({
|
|
@@ -33,49 +33,49 @@ var ae = {
|
|
|
33
33
|
filterableProps: a,
|
|
34
34
|
sortableProps: o
|
|
35
35
|
}), (t, r) => {
|
|
36
|
-
let i =
|
|
37
|
-
return
|
|
36
|
+
let i = k, a = w, o = O, c = T;
|
|
37
|
+
return _(), u(c, {
|
|
38
38
|
modelValue: n.value,
|
|
39
39
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e),
|
|
40
40
|
class: "table-column-filter",
|
|
41
41
|
title: "表格设置",
|
|
42
42
|
"append-to-body": ""
|
|
43
43
|
}, {
|
|
44
|
-
default:
|
|
44
|
+
default: C(() => [f(o, {
|
|
45
45
|
data: e.columns,
|
|
46
46
|
border: ""
|
|
47
47
|
}, {
|
|
48
|
-
default:
|
|
48
|
+
default: C(() => [
|
|
49
49
|
f(i, { label: "列名" }, {
|
|
50
|
-
default:
|
|
50
|
+
default: C(({ row: e }) => [d(b(e.label), 1)]),
|
|
51
51
|
_: 1
|
|
52
52
|
}),
|
|
53
53
|
f(i, {
|
|
54
54
|
label: "隐藏",
|
|
55
55
|
align: "center"
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
57
|
+
default: C(({ row: e }) => [f(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
|
|
58
58
|
_: 1
|
|
59
59
|
}),
|
|
60
60
|
f(i, {
|
|
61
61
|
label: "冻结",
|
|
62
62
|
align: "center"
|
|
63
63
|
}, {
|
|
64
|
-
default:
|
|
64
|
+
default: C(({ row: e }) => [f(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
|
|
65
65
|
_: 1
|
|
66
66
|
}),
|
|
67
67
|
f(i, {
|
|
68
68
|
label: "过滤",
|
|
69
69
|
align: "center"
|
|
70
70
|
}, {
|
|
71
|
-
default:
|
|
71
|
+
default: C(({ row: e }) => [f(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
|
|
72
72
|
_: 1
|
|
73
73
|
}),
|
|
74
74
|
f(i, {
|
|
75
75
|
label: "排序",
|
|
76
76
|
align: "center"
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: C(({ row: e }) => [f(a, {
|
|
79
79
|
title: e.allowSort ? null : "该列不支持排序!",
|
|
80
80
|
disabled: !e.allowSort,
|
|
81
81
|
onChange: (t) => s(t, e, "sortable")
|
|
@@ -93,13 +93,13 @@ var ae = {
|
|
|
93
93
|
}, 8, ["modelValue"]);
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, M = {
|
|
97
97
|
props: {
|
|
98
98
|
filterable: Boolean,
|
|
99
99
|
prop: String
|
|
100
100
|
},
|
|
101
101
|
setup(e, { attrs: t, slots: n }) {
|
|
102
|
-
let i =
|
|
102
|
+
let i = p(r, null), o = l(() => {
|
|
103
103
|
if (e.filterable && i) return (e, t, n) => t[n.property] === e;
|
|
104
104
|
}), s = l(() => {
|
|
105
105
|
if (e.filterable && i) return [...new Set(i.records.value.map((t) => t[e.prop]).filter((e) => e))].map((e) => ({
|
|
@@ -107,7 +107,7 @@ var ae = {
|
|
|
107
107
|
value: e
|
|
108
108
|
}));
|
|
109
109
|
});
|
|
110
|
-
return () => f(a,
|
|
110
|
+
return () => f(a, h(t, {
|
|
111
111
|
prop: e.prop,
|
|
112
112
|
filterable: e.filterable,
|
|
113
113
|
filterMethod: o.value,
|
|
@@ -289,81 +289,52 @@ var ae = {
|
|
|
289
289
|
disabledRowKeys: Array,
|
|
290
290
|
selectExport: Boolean,
|
|
291
291
|
useVisibilityChange: Boolean
|
|
292
|
-
}, P = { data: !0 },
|
|
293
|
-
"change",
|
|
294
|
-
"expand-change",
|
|
295
|
-
"blur",
|
|
296
|
-
"focus",
|
|
297
|
-
"clear",
|
|
298
|
-
"visible-change",
|
|
299
|
-
"remove-tag"
|
|
300
|
-
], ce = (e) => P[e] !== !0;
|
|
292
|
+
}, P = { data: !0 }, oe = (e) => P[e] !== !0;
|
|
301
293
|
//#endregion
|
|
302
294
|
//#region src/components/table/PageableTable.vue?vue&type=script&lang.jsx
|
|
303
|
-
function
|
|
295
|
+
function se(e) {
|
|
304
296
|
let t = "";
|
|
305
297
|
for (let n in e) t += `<TableColumn prop="${n}" label="${n}"/>\n`;
|
|
306
298
|
return t;
|
|
307
299
|
}
|
|
308
|
-
var
|
|
300
|
+
var F = {
|
|
309
301
|
loading: 1,
|
|
310
302
|
error: -1,
|
|
311
303
|
empty: 2,
|
|
312
304
|
success: 0
|
|
313
|
-
},
|
|
305
|
+
}, I = {
|
|
314
306
|
name: "PageableTable",
|
|
315
|
-
emits: {
|
|
316
|
-
"page-loaded": null,
|
|
317
|
-
select: null,
|
|
318
|
-
"select-all": null,
|
|
319
|
-
"selection-change": null,
|
|
320
|
-
"cell-mouse-enter": null,
|
|
321
|
-
"cell-mouse-leave": null,
|
|
322
|
-
"cell-click": null,
|
|
323
|
-
"cell-dblclick": null,
|
|
324
|
-
"cell-contextmenu": null,
|
|
325
|
-
"row-click": null,
|
|
326
|
-
"row-contextmenu": null,
|
|
327
|
-
"row-dblclick": null,
|
|
328
|
-
"header-click": null,
|
|
329
|
-
"header-contextmenu": null,
|
|
330
|
-
"sort-change": null,
|
|
331
|
-
"filter-change": null,
|
|
332
|
-
"current-change": null,
|
|
333
|
-
"header-dragend": null,
|
|
334
|
-
"expand-change": null,
|
|
335
|
-
scroll: null
|
|
336
|
-
},
|
|
307
|
+
emits: { "page-loaded": null },
|
|
337
308
|
inheritAttrs: !1,
|
|
338
309
|
props: { ...N },
|
|
339
|
-
setup(a, { emit: u, attrs: p, slots: m, expose:
|
|
340
|
-
let v =
|
|
310
|
+
setup(a, { emit: u, attrs: p, slots: m, expose: _ }) {
|
|
311
|
+
let v = y(), b = y(), x = y(1), C = y(F.empty), w = y([]), T = y(null), N = y(!1), P = y([]), I = y({
|
|
341
312
|
total: 0,
|
|
342
313
|
page: 1,
|
|
343
314
|
limit: a.pageSize,
|
|
344
315
|
ascs: a.ascs,
|
|
345
316
|
descs: a.descs
|
|
346
|
-
}), L =
|
|
347
|
-
asc:
|
|
348
|
-
desc:
|
|
349
|
-
page:
|
|
350
|
-
limit:
|
|
317
|
+
}), L = y(0), R = y(0), z = l(() => a.reloadOnModelChange ? {
|
|
318
|
+
asc: I.value.ascs,
|
|
319
|
+
desc: I.value.descs,
|
|
320
|
+
page: I.value.page,
|
|
321
|
+
limit: I.value.limit,
|
|
351
322
|
model: a.model
|
|
352
323
|
} : {
|
|
353
|
-
asc:
|
|
354
|
-
desc:
|
|
355
|
-
page:
|
|
356
|
-
limit:
|
|
324
|
+
asc: I.value.ascs,
|
|
325
|
+
desc: I.value.descs,
|
|
326
|
+
page: I.value.page,
|
|
327
|
+
limit: I.value.limit
|
|
357
328
|
}), B = l(() => {
|
|
358
329
|
var e;
|
|
359
|
-
let t = `${(
|
|
330
|
+
let t = `${(I.value.page - 1) * I.value.limit + (((e = w.value) == null ? void 0 : e.length) ?? 0)}`;
|
|
360
331
|
return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
|
|
361
|
-
}), V = (
|
|
362
|
-
U()
|
|
332
|
+
}), V = () => {
|
|
333
|
+
U();
|
|
363
334
|
}, H = (e, t, n) => {
|
|
364
335
|
if (a.clickRowSelect && $(e)) {
|
|
365
336
|
var r;
|
|
366
|
-
if (
|
|
337
|
+
if (P.value.find((t) => t[a.rowKey] === e[a.rowKey])) {
|
|
367
338
|
var i;
|
|
368
339
|
(i = v.value) == null || i.toggleRowSelection(e, !1);
|
|
369
340
|
return;
|
|
@@ -379,46 +350,46 @@ var I = {
|
|
|
379
350
|
n == null || (t = n.$refs) == null || (t = t.tooltip) == null || t.hide();
|
|
380
351
|
}, W = ({ scrollLeft: e, scrollTop: t }) => {
|
|
381
352
|
L.value = t, R.value = e;
|
|
382
|
-
}, le = () => {
|
|
383
|
-
me(L.value, R.value);
|
|
384
|
-
}, ue = (t) => e(F(t)), de = ({ prop: e, order: t }) => {
|
|
385
|
-
a.payloadStyle === "body" ? (P.value.ascs = t === "ascending" ? [e] : a.ascs, P.value.descs = t === "descending" ? [e] : a.descs) : (P.value.ascs = t === "ascending" ? e : "", P.value.descs = t === "descending" ? e : "");
|
|
386
|
-
}, fe = (e) => {
|
|
387
|
-
$(e) && (E.value = e);
|
|
388
|
-
}, pe = (e) => {
|
|
389
|
-
N.value = e, u("selection-change", e);
|
|
390
353
|
}, G = () => {
|
|
354
|
+
pe(L.value, R.value);
|
|
355
|
+
}, ce = (t) => e(se(t)), le = ({ prop: e, order: t }) => {
|
|
356
|
+
a.payloadStyle === "body" ? (I.value.ascs = t === "ascending" ? [e] : a.ascs, I.value.descs = t === "descending" ? [e] : a.descs) : (I.value.ascs = t === "ascending" ? e : "", I.value.descs = t === "descending" ? e : "");
|
|
357
|
+
}, ue = (e) => {
|
|
358
|
+
$(e) && (T.value = e);
|
|
359
|
+
}, de = (e) => {
|
|
360
|
+
P.value = e;
|
|
361
|
+
}, K = () => {
|
|
391
362
|
var e;
|
|
392
363
|
(e = v.value) == null || e.clearSelection();
|
|
393
|
-
},
|
|
364
|
+
}, fe = () => {
|
|
394
365
|
let e;
|
|
395
366
|
return e = a.payloadStyle === "body" ? {
|
|
396
367
|
page: {
|
|
397
|
-
...
|
|
398
|
-
current:
|
|
399
|
-
size:
|
|
368
|
+
...I.value,
|
|
369
|
+
current: I.value.page,
|
|
370
|
+
size: I.value.limit
|
|
400
371
|
},
|
|
401
372
|
example: a.model || {}
|
|
402
373
|
} : {
|
|
403
|
-
...
|
|
404
|
-
current:
|
|
405
|
-
size:
|
|
374
|
+
...I.value,
|
|
375
|
+
current: I.value.page,
|
|
376
|
+
size: I.value.limit,
|
|
406
377
|
...a.model || {}
|
|
407
|
-
}, a.selectExport && (a.rowKey ? e.exportKeys =
|
|
378
|
+
}, a.selectExport && (a.rowKey ? e.exportKeys = P.value.map((e) => e[a.rowKey]) : e.exportKeys = P.value.map((e) => w.value.indexOf(e))), e;
|
|
408
379
|
}, q = async (e = !0) => {
|
|
409
380
|
if (s(p, "data") && p.data !== !1) {
|
|
410
381
|
var t;
|
|
411
|
-
|
|
382
|
+
w.value = p.data, I.value.page = 1, I.value.total = (t = w.value) == null ? void 0 : t.length, I.value.limit = I.value.total;
|
|
412
383
|
return;
|
|
413
384
|
}
|
|
414
|
-
e !== !1 && (
|
|
415
|
-
let n, r =
|
|
385
|
+
e !== !1 && (w.value = []);
|
|
386
|
+
let n, r = fe();
|
|
416
387
|
if (a.api) {
|
|
417
|
-
e !== !1 && (C.value =
|
|
388
|
+
e !== !1 && (C.value = F.loading);
|
|
418
389
|
try {
|
|
419
390
|
a.api && (n = await a.api(r));
|
|
420
391
|
} catch {
|
|
421
|
-
C.value =
|
|
392
|
+
C.value = F.error;
|
|
422
393
|
return;
|
|
423
394
|
}
|
|
424
395
|
} else if (a.data) n = { data: { data: {
|
|
@@ -426,14 +397,14 @@ var I = {
|
|
|
426
397
|
records: a.data
|
|
427
398
|
} } };
|
|
428
399
|
else {
|
|
429
|
-
|
|
400
|
+
re.warning({
|
|
430
401
|
title: "开发提示!",
|
|
431
402
|
message: "PageableTable api(Function) 属性"
|
|
432
403
|
});
|
|
433
404
|
return;
|
|
434
405
|
}
|
|
435
406
|
let { data: { data: i } = {} } = n || {}, { total: o, records: c } = i || {};
|
|
436
|
-
|
|
407
|
+
I.value.total = Number(o), w.value = await me(c), !c || !c.length ? C.value = F.empty : C.value = F.success, J(), u("page-loaded", i);
|
|
437
408
|
}, J = () => {
|
|
438
409
|
ee(() => {
|
|
439
410
|
var e;
|
|
@@ -442,19 +413,19 @@ var I = {
|
|
|
442
413
|
}, Y = async (e) => {
|
|
443
414
|
await q(e);
|
|
444
415
|
}, X = () => {
|
|
445
|
-
|
|
416
|
+
I.value = {
|
|
446
417
|
total: 0,
|
|
447
418
|
page: 1,
|
|
448
419
|
limit: a.pageSize,
|
|
449
420
|
ascs: a.ascs,
|
|
450
421
|
descs: a.descs
|
|
451
422
|
};
|
|
452
|
-
},
|
|
423
|
+
}, pe = (e, t) => {
|
|
453
424
|
v.value.setScrollTop(e), v.value.setScrollLeft(t);
|
|
454
425
|
}, Z = (e, t) => {
|
|
455
426
|
var n;
|
|
456
427
|
(n = v.value) == null || n.toggleRowSelection(e, t);
|
|
457
|
-
},
|
|
428
|
+
}, me = async (e) => {
|
|
458
429
|
if (!e) return [];
|
|
459
430
|
let t = [...e];
|
|
460
431
|
for (let e of t) for (let t of a.dicOptions) if (e[`$${t.prop}`] = e[t.prop], t.dicData) {
|
|
@@ -463,49 +434,45 @@ var I = {
|
|
|
463
434
|
} else e[t.prop] = await n(t.dicType, e[t.prop]);
|
|
464
435
|
return t;
|
|
465
436
|
}, Q = () => {
|
|
466
|
-
|
|
437
|
+
N.value = !N.value;
|
|
467
438
|
}, $ = (e) => {
|
|
468
439
|
var t;
|
|
469
440
|
return !(e != null && e.disabled) && !((t = a.disabledRowKeys) != null && t.includes(e == null ? void 0 : e[a.rowKey]));
|
|
470
441
|
};
|
|
471
442
|
a.useVisibilityChange && o({ onPageVisible: () => {
|
|
472
443
|
Y(!1);
|
|
473
|
-
} }),
|
|
444
|
+
} }), A("reloadTableView", (e) => {
|
|
474
445
|
e === a.viewId && q();
|
|
475
|
-
}),
|
|
446
|
+
}), S(() => a.url, X), S(() => a.api, X), S(() => p.data, q), S(() => z.value, q, {
|
|
476
447
|
deep: !0,
|
|
477
448
|
immediate: a.immediate
|
|
449
|
+
}), g(() => {
|
|
450
|
+
G();
|
|
478
451
|
}), te(() => {
|
|
479
|
-
|
|
480
|
-
}), _(
|
|
481
|
-
|
|
482
|
-
}), h({
|
|
483
|
-
records: T,
|
|
452
|
+
x.value++;
|
|
453
|
+
}), _({
|
|
454
|
+
records: w,
|
|
484
455
|
getPage: q,
|
|
485
456
|
refresh: Y,
|
|
486
457
|
reload: X,
|
|
487
458
|
doLayout: J,
|
|
488
|
-
clearSelection:
|
|
459
|
+
clearSelection: K,
|
|
489
460
|
toggleRowSelection: Z,
|
|
490
461
|
toggleSettings: Q
|
|
491
|
-
}),
|
|
492
|
-
records:
|
|
462
|
+
}), ne(r, {
|
|
463
|
+
records: w,
|
|
493
464
|
getPage: q,
|
|
494
465
|
refresh: Y,
|
|
495
466
|
reload: X,
|
|
496
467
|
doLayout: J,
|
|
497
|
-
clearSelection:
|
|
468
|
+
clearSelection: K,
|
|
498
469
|
toggleRowSelection: Z,
|
|
499
470
|
toggleSettings: Q
|
|
500
471
|
});
|
|
501
|
-
let ge = t(a, {
|
|
502
|
-
emit: u,
|
|
503
|
-
events: se,
|
|
504
|
-
predicate: ce
|
|
505
|
-
});
|
|
472
|
+
let { autoBindProps: he, listeners: ge } = t(a, { predicate: oe });
|
|
506
473
|
return () => {
|
|
507
474
|
var e;
|
|
508
|
-
let t =
|
|
475
|
+
let t = T.value && T.value[p["row-key"] || a.rowKey || "id"] === (T.value && a.rowKey ? T.value[a.rowKey] : (e = T.value) == null ? void 0 : e.id), n = [];
|
|
509
476
|
if (m.default) {
|
|
510
477
|
var r;
|
|
511
478
|
let e = (r = m.default) == null ? void 0 : r.call(m);
|
|
@@ -536,79 +503,79 @@ var I = {
|
|
|
536
503
|
});
|
|
537
504
|
});
|
|
538
505
|
return f("div", { class: ["pageable-table", { "auto-height": a.autoHeight }] }, [f("div", { class: "pageable-table-wrapper" }, [
|
|
539
|
-
m.toolbar && m.toolbar({ selectedRows:
|
|
540
|
-
f(
|
|
506
|
+
m.toolbar && m.toolbar({ selectedRows: P.value }),
|
|
507
|
+
f(O, h(ge.value, he.value, {
|
|
541
508
|
ref: v,
|
|
542
|
-
data:
|
|
509
|
+
data: w.value,
|
|
543
510
|
class: ["flex-item", { "header-bold": a.headerBold }],
|
|
544
511
|
border: a.border,
|
|
545
512
|
stripe: !0,
|
|
546
513
|
size: "default",
|
|
547
514
|
height: a.autoHeight ? null : "auto",
|
|
548
515
|
onScroll: W,
|
|
549
|
-
onSortChange:
|
|
516
|
+
onSortChange: le,
|
|
550
517
|
onRowDblclick: V,
|
|
551
518
|
onRowClick: H,
|
|
552
519
|
onCellClick: U,
|
|
553
|
-
onCurrentChange:
|
|
554
|
-
onSelectionChange:
|
|
520
|
+
onCurrentChange: ue,
|
|
521
|
+
onSelectionChange: de
|
|
555
522
|
}), {
|
|
556
523
|
default: () => {
|
|
557
524
|
let e = [];
|
|
558
|
-
if (a.multiple && a.selection && e.push(f(
|
|
525
|
+
if (a.multiple && a.selection && e.push(f(k, {
|
|
559
526
|
type: "selection",
|
|
560
527
|
selectable: $,
|
|
561
528
|
width: a.selectionWidth,
|
|
562
529
|
align: "center"
|
|
563
|
-
}, null)), !a.multiple && a.selection && e.push(f(
|
|
530
|
+
}, null)), !a.multiple && a.selection && e.push(f(k, {
|
|
564
531
|
type: "single-selection",
|
|
565
532
|
"class-name": "single-select-column",
|
|
566
533
|
width: a.selectionWidth,
|
|
567
534
|
align: "center"
|
|
568
535
|
}, {
|
|
569
|
-
header: () => f(
|
|
570
|
-
modelValue: !!
|
|
536
|
+
header: () => f(D, {
|
|
537
|
+
modelValue: !!T.value,
|
|
571
538
|
label: !0
|
|
572
539
|
}, { default: () => [f("span", null, null)] }),
|
|
573
|
-
default: ({ row: e }) => f(
|
|
540
|
+
default: ({ row: e }) => f(D, {
|
|
574
541
|
label: !0,
|
|
575
542
|
disabled: !$(e),
|
|
576
543
|
modelValue: t
|
|
577
544
|
}, { default: () => [f("span", null, null)] })
|
|
578
|
-
})), a.index && e.push(f(
|
|
545
|
+
})), a.index && e.push(f(k, {
|
|
579
546
|
type: "index",
|
|
580
547
|
label: "序号",
|
|
581
548
|
width: B.value,
|
|
582
549
|
align: "center"
|
|
583
|
-
}, { default: ({ $index: e }) => (
|
|
550
|
+
}, { default: ({ $index: e }) => (I.value.page - 1) * I.value.limit + e + 1 || e + 1 })), n.length > 0) for (let t = 0; t < n.length; t++) {
|
|
584
551
|
let r = n[t];
|
|
585
552
|
if (r.hide) continue;
|
|
586
553
|
let i = r.prop;
|
|
587
|
-
e.push(f(
|
|
554
|
+
e.push(f(M, r, { default: m[i] ? ({ row: e }) => m[i]({ row: e }) : void 0 }));
|
|
588
555
|
}
|
|
589
|
-
else e.push(f(
|
|
556
|
+
else e.push(f(k, { label: "点击表格行复制模板" }, { default: ({ row: e }) => f("pre", {
|
|
590
557
|
class: "pointer",
|
|
591
|
-
onClick: () =>
|
|
558
|
+
onClick: () => ce(e)
|
|
592
559
|
}, [JSON.stringify(e, null, " ")]) }));
|
|
593
560
|
return e;
|
|
594
561
|
},
|
|
595
562
|
empty: () => m.empty ? m.empty() : f(c, null, [
|
|
596
|
-
C.value ===
|
|
597
|
-
C.value ===
|
|
563
|
+
C.value === F.loading && f("span", { class: "pageable-table-loading" }, [f("i", { class: "table-status-icon el-icon-loading" }, null), d("加载中...")]),
|
|
564
|
+
C.value === F.error && f(ie, {
|
|
598
565
|
class: "pageable-table-error",
|
|
599
566
|
onClick: Y
|
|
600
567
|
}, { default: () => [f("i", { class: "table-status-icon el-icon-error" }, null), d("加载失败,点击重试!")] }),
|
|
601
|
-
C.value !==
|
|
568
|
+
C.value !== F.loading && C.value !== F.error && f(ae, null, null)
|
|
602
569
|
]),
|
|
603
570
|
append: m.append
|
|
604
571
|
}),
|
|
605
|
-
a.paging && f(
|
|
606
|
-
"current-page":
|
|
607
|
-
"onUpdate:current-page": (e) =>
|
|
572
|
+
a.paging && f(E, {
|
|
573
|
+
"current-page": I.value.page,
|
|
574
|
+
"onUpdate:current-page": (e) => I.value.page = e,
|
|
608
575
|
"hide-on-single-page": a.hideOnSinglePage,
|
|
609
|
-
"page-size":
|
|
610
|
-
"onUpdate:page-size": (e) =>
|
|
611
|
-
total:
|
|
576
|
+
"page-size": I.value.limit,
|
|
577
|
+
"onUpdate:page-size": (e) => I.value.limit = e,
|
|
578
|
+
total: I.value.total,
|
|
612
579
|
"page-sizes": [
|
|
613
580
|
10,
|
|
614
581
|
25,
|
|
@@ -622,15 +589,15 @@ var I = {
|
|
|
622
589
|
background: !0,
|
|
623
590
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
624
591
|
}, null),
|
|
625
|
-
f(
|
|
592
|
+
f(j, {
|
|
626
593
|
ref: b,
|
|
627
|
-
modelValue:
|
|
628
|
-
"onUpdate:modelValue": (e) =>
|
|
594
|
+
modelValue: N.value,
|
|
595
|
+
"onUpdate:modelValue": (e) => N.value = e,
|
|
629
596
|
columns: n
|
|
630
597
|
}, null)
|
|
631
598
|
]), f(i, { onNotify: J }, null)]);
|
|
632
599
|
};
|
|
633
600
|
}
|
|
634
|
-
}
|
|
601
|
+
};
|
|
635
602
|
//#endregion
|
|
636
|
-
export {
|
|
603
|
+
export { I as t };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElTimeSelect as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/time-select.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: String,
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
editable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
clearable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
includeEndTime: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "default"
|
|
29
|
+
},
|
|
30
|
+
placeholder: String,
|
|
31
|
+
name: String,
|
|
32
|
+
effect: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "light"
|
|
35
|
+
},
|
|
36
|
+
prefixIcon: [String, Object],
|
|
37
|
+
clearIcon: [String, Object],
|
|
38
|
+
start: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "09:00"
|
|
41
|
+
},
|
|
42
|
+
end: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "18:00"
|
|
45
|
+
},
|
|
46
|
+
step: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "00:30"
|
|
49
|
+
},
|
|
50
|
+
minTime: String,
|
|
51
|
+
maxTime: String,
|
|
52
|
+
format: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "HH:mm"
|
|
55
|
+
},
|
|
56
|
+
emptyValues: Array,
|
|
57
|
+
valueOnClear: [
|
|
58
|
+
String,
|
|
59
|
+
Number,
|
|
60
|
+
Boolean,
|
|
61
|
+
Function
|
|
62
|
+
],
|
|
63
|
+
popperClass: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
popperStyle: [String, Object]
|
|
68
|
+
}, c = {
|
|
69
|
+
disabled: !0,
|
|
70
|
+
modelValue: !0
|
|
71
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
72
|
+
name: "FormTimeSelect",
|
|
73
|
+
inheritAttrs: !1,
|
|
74
|
+
props: { ...s },
|
|
75
|
+
emits: { ...t },
|
|
76
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
77
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
78
|
+
emit: n,
|
|
79
|
+
slots: r,
|
|
80
|
+
attrs: s,
|
|
81
|
+
predicate: l
|
|
82
|
+
});
|
|
83
|
+
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
84
|
+
style: "width: 100%",
|
|
85
|
+
modelValue: t.modelValue,
|
|
86
|
+
disabled: f.value,
|
|
87
|
+
"onUpdate:modelValue": c,
|
|
88
|
+
placeholder: d.value
|
|
89
|
+
}), null) });
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { u as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n } from "./CSyJ-vEx.mjs";
|
|
3
3
|
import { computed as r, createVNode as i, mergeProps as a } from "vue";
|
|
4
4
|
import { ElDatePicker as o } from "element-plus/es";
|
|
5
5
|
import { toDate as s } from "@web-utils/integrations/dayjs";
|
|
@@ -140,10 +140,11 @@ var c = {
|
|
|
140
140
|
}, l = {
|
|
141
141
|
modelValue: !0,
|
|
142
142
|
name: !0,
|
|
143
|
+
disabled: !0,
|
|
143
144
|
emptyValues: !0,
|
|
144
145
|
type: !0,
|
|
145
146
|
valueOnClear: !0
|
|
146
|
-
}, u =
|
|
147
|
+
}, u = (e) => n[e] === void 0 && l[e] !== !0, d = {
|
|
147
148
|
name: "FormDatePicker",
|
|
148
149
|
inheritAttrs: !1,
|
|
149
150
|
props: { ...c },
|
|
@@ -153,12 +154,11 @@ var c = {
|
|
|
153
154
|
"update:endDate": null
|
|
154
155
|
},
|
|
155
156
|
setup(t, { emit: n, slots: c, attrs: l }) {
|
|
156
|
-
let { emitInput:
|
|
157
|
+
let { emitInput: d, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = e(t, {
|
|
157
158
|
emit: n,
|
|
158
159
|
slots: c,
|
|
159
160
|
attrs: l,
|
|
160
|
-
|
|
161
|
-
predicate: d,
|
|
161
|
+
predicate: u,
|
|
162
162
|
messagePrefix: "请选择"
|
|
163
163
|
}), _ = r(() => t.dateTimeRange || t.dateRange || t.monthRange), v = r(() => t.year ? "YYYY" : t.month || t.monthRange ? "YYYY-MM" : t.week ? "YYYY 第 WW 周" : t.dateTime || t.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), y = r(() => t.year ? "year" : t.month ? "month" : t.dates ? "dates" : t.week ? "week" : t.dateTime ? "datetime" : t.dateTimeRange ? "datetimerange" : t.dateRange ? "daterange" : t.monthRange ? "monthrange" : "date"), b = r(() => {
|
|
164
164
|
if (t.miniDate) {
|
|
@@ -172,13 +172,14 @@ var c = {
|
|
|
172
172
|
}, C = (e, t) => {
|
|
173
173
|
n("update:startDate", e), n("update:endDate", t);
|
|
174
174
|
}, w = (e) => {
|
|
175
|
-
_.value && t.split ? e ? C(e[0], e[1]) : C(null, null) :
|
|
175
|
+
_.value && t.split ? e ? C(e[0], e[1]) : C(null, null) : d(e);
|
|
176
176
|
}, T = r(() => _.value && t.split ? [t.startDate, t.endDate] : t.modelValue), E = r(() => t.week ? "YYYY-MM-DD" : t.valueFormat || v.value), D = r(() => t.format || v.value);
|
|
177
|
-
return () =>
|
|
177
|
+
return () => f({ vNodes: i(o, a(h.value, g.value, {
|
|
178
|
+
style: "width: 100%",
|
|
178
179
|
type: y.value,
|
|
179
180
|
modelValue: T.value,
|
|
180
|
-
disabled:
|
|
181
|
-
placeholder:
|
|
181
|
+
disabled: m.value,
|
|
182
|
+
placeholder: p.value,
|
|
182
183
|
format: D.value,
|
|
183
184
|
disabledDate: S,
|
|
184
185
|
"value-format": E.value,
|
|
@@ -194,4 +195,4 @@ var c = {
|
|
|
194
195
|
}
|
|
195
196
|
};
|
|
196
197
|
//#endregion
|
|
197
|
-
export {
|
|
198
|
+
export { d as t };
|