@web-utils/form-ui 1.0.0-beta50 → 1.0.0-beta51
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/{zwXzk9ff2.mjs → BG8z3V9d2.mjs} +204 -129
- package/chunks/{kflKDW4T2.mjs → BQk3-Ppb2.mjs} +1 -1
- package/chunks/{hzaYr6Ud2.mjs → BQyL45PF2.mjs} +1 -1
- package/chunks/{Cln3RBAD.mjs → BWh6u1O0.mjs} +1 -1
- package/chunks/{Dkd5BC98.mjs → Bwbtu2cp.mjs} +0 -4
- package/chunks/{vXQf89tS.mjs → C7G-cAoI.mjs} +1 -1
- package/chunks/{BUGCiCnl.mjs → CXsoKP22.mjs} +4 -1
- package/chunks/{CqoVAnxC2.mjs → CqVd8D222.mjs} +0 -4
- package/chunks/{BA2KEptL.mjs → DKwp6AMl.mjs} +0 -4
- package/chunks/{D0Zg2CV0.mjs → D_Fs3bkZ.mjs} +1 -1
- package/chunks/{CxTg0r4n.mjs → Dt3lfDnL.mjs} +1 -1
- package/chunks/{cqIZWDHo.mjs → YFiU0ngn.mjs} +174 -166
- package/chunks/{B-zqRAXo.mjs → wDS9KBFw.mjs} +2 -4
- package/confirm-button/index.d.ts +9 -2
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.d.ts +9 -2
- package/confirmable/index.mjs +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.mjs +2 -2
- package/editable-tree/index.mjs +1 -1
- package/form-button/index.d.ts +9 -2
- package/form-cascader/index.d.ts +8 -8
- package/form-cascader/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-time/index.d.ts +8 -8
- package/form-input-time/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-time-select/index.d.ts +8 -8
- package/form-time-select/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +12 -12
- package/package.json +1 -1
- package/pageable-table/index.d.ts +2 -0
- package/pageable-table/index.mjs +1 -1
- package/pageable-table/style.css +1 -1
- package/sub-table/index.mjs +154 -89
- package/sub-table-plus/index.d.ts +4 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-view/index.d.ts +2 -1
- package/table-view/index.mjs +111 -108
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.d.ts +2 -2
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +1 -1
|
@@ -2,25 +2,26 @@ import e from "../confirmable/index.mjs";
|
|
|
2
2
|
import t from "../confirm-button/index.mjs";
|
|
3
3
|
import { s as n } from "./DcTVYqeJ.mjs";
|
|
4
4
|
import { t as r } from "./DOZRzqlo.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { t as a } from "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as c } from "./
|
|
10
|
-
import { t as l } from "./
|
|
11
|
-
import { t as u } from "./
|
|
5
|
+
import { cellClickHandlerContextKey as i } from "../constants/index.mjs";
|
|
6
|
+
import { t as a } from "./Dt3lfDnL.mjs";
|
|
7
|
+
import { t as o } from "./CkOD-_VV.mjs";
|
|
8
|
+
import { n as s } from "./D_qiRmiE.mjs";
|
|
9
|
+
import { t as c } from "./Bwbtu2cp.mjs";
|
|
10
|
+
import { t as l } from "./wXeqV-_7.mjs";
|
|
11
|
+
import { t as u } from "./CabldOLo.mjs";
|
|
12
|
+
import { t as ee } from "./V2p-PCpL.mjs";
|
|
12
13
|
import { t as d } from "./B1IPSTA6.mjs";
|
|
13
14
|
import { t as f } from "./BbSPWDDZ.mjs";
|
|
14
15
|
import { t as p } from "./bFbPPcdq.mjs";
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import
|
|
18
|
-
import { findTreeChildren as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { formContextKey as
|
|
21
|
-
import { cloneDeep as
|
|
16
|
+
import { t as m } from "./BtcjAHE6.mjs";
|
|
17
|
+
import { t as h } from "./YFiU0ngn.mjs";
|
|
18
|
+
import g from "../table-column-def/index.mjs";
|
|
19
|
+
import { findTreeChildren as _, isFunction as v } from "@web-utils/core";
|
|
20
|
+
import { Fragment as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as w, createTextVNode as T, createVNode as E, mergeProps as D, normalizeClass as O, openBlock as k, renderList as A, renderSlot as j, resolveComponent as M, toDisplayString as N, toHandlers as P, withCtx as F, withModifiers as I } from "vue";
|
|
21
|
+
import { formContextKey as L, formItemContextKey as R } from "element-plus";
|
|
22
|
+
import { cloneDeep as z } from "@web-utils/integrations/lodash";
|
|
22
23
|
//#region src/components/table/sub-table-plus.ts
|
|
23
|
-
var
|
|
24
|
+
var B = {
|
|
24
25
|
modelValue: Array,
|
|
25
26
|
prop: String,
|
|
26
27
|
columns: Array,
|
|
@@ -47,21 +48,24 @@ var R = {
|
|
|
47
48
|
onRowDbClick: Function,
|
|
48
49
|
showMessage: Boolean,
|
|
49
50
|
pageSize: Number
|
|
50
|
-
},
|
|
51
|
+
}, V = {
|
|
51
52
|
name: "SubTablePlus",
|
|
52
53
|
inject: {
|
|
53
54
|
elForm: {
|
|
54
|
-
from:
|
|
55
|
+
from: L,
|
|
55
56
|
default: ""
|
|
56
57
|
},
|
|
57
58
|
elFormItem: {
|
|
58
|
-
from:
|
|
59
|
+
from: R,
|
|
59
60
|
default: ""
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
|
-
|
|
63
|
+
provide() {
|
|
64
|
+
return { [i]: this.rowDbClick };
|
|
65
|
+
},
|
|
66
|
+
props: { ...B },
|
|
63
67
|
emits: {
|
|
64
|
-
...
|
|
68
|
+
...s,
|
|
65
69
|
"add-row": null
|
|
66
70
|
},
|
|
67
71
|
data() {
|
|
@@ -113,7 +117,7 @@ var R = {
|
|
|
113
117
|
},
|
|
114
118
|
methods: {
|
|
115
119
|
getCellType(e, t) {
|
|
116
|
-
return
|
|
120
|
+
return v(t.getType) ? t.getType(e, t) : t.type;
|
|
117
121
|
},
|
|
118
122
|
getInputAttr(e, t) {
|
|
119
123
|
return t.attrs && t.getAttrs ? {
|
|
@@ -148,7 +152,7 @@ var R = {
|
|
|
148
152
|
if (this.fetchApi) this.addRow();
|
|
149
153
|
else {
|
|
150
154
|
var n;
|
|
151
|
-
let e =
|
|
155
|
+
let e = z(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
|
|
152
156
|
t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
|
|
153
157
|
}
|
|
154
158
|
},
|
|
@@ -180,7 +184,7 @@ var R = {
|
|
|
180
184
|
}
|
|
181
185
|
if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
|
|
182
186
|
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
183
|
-
let [r] =
|
|
187
|
+
let [r] = _(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
184
188
|
if (r) return r[n.attrs.valueKey || "label"];
|
|
185
189
|
}
|
|
186
190
|
return e[t.property];
|
|
@@ -201,10 +205,10 @@ var R = {
|
|
|
201
205
|
(t = this.onRowDbClick) == null || t.call(this, ...e);
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
|
-
},
|
|
208
|
+
}, H = { class: "table-header flex-row" }, U = { class: "flex-item" }, W = { class: "flex-not-shrink" }, G = {
|
|
205
209
|
key: 0,
|
|
206
210
|
style: { color: "#f56c6c" }
|
|
207
|
-
},
|
|
211
|
+
}, K = ["title"], q = ["onClick"], J = {
|
|
208
212
|
key: 0,
|
|
209
213
|
class: "flex-row vertical-center horizon-center",
|
|
210
214
|
style: {
|
|
@@ -213,11 +217,11 @@ var R = {
|
|
|
213
217
|
"border-top": "none"
|
|
214
218
|
}
|
|
215
219
|
};
|
|
216
|
-
function
|
|
217
|
-
var
|
|
218
|
-
let
|
|
219
|
-
return
|
|
220
|
-
|
|
220
|
+
function Y(n, i, o, s, _, v) {
|
|
221
|
+
var L, R;
|
|
222
|
+
let z = a, B = t, V = u, Y = l, X = p, Z = M("FormInputUser"), Q = M("FormInputDepartment"), te = m, ne = d, re = c, ie = ee, ae = f, oe = r, $ = g, se = e, ce = h;
|
|
223
|
+
return k(), S("div", { class: O(["sub-table-plus", { "hide-message": !n.showMessage }]) }, [
|
|
224
|
+
E(ce, D(n.$attrs, {
|
|
221
225
|
ref: "table",
|
|
222
226
|
"auto-height": "",
|
|
223
227
|
data: n.fetchApi ? null : _.rows,
|
|
@@ -231,10 +235,10 @@ function q(n, a, o, g, _, F) {
|
|
|
231
235
|
"hide-on-single-page": "",
|
|
232
236
|
selection: n.selection,
|
|
233
237
|
index: n.index
|
|
234
|
-
},
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
key: `${e.prop}-${
|
|
238
|
+
}, P(v.listeners), { onSelectionChange: v.onSelectionChange }), w({
|
|
239
|
+
default: F(() => [
|
|
240
|
+
j(n.$slots, "columns", { columns: n.columns }, () => [(k(!0), S(y, null, A(v.filteredColumns, (e) => (k(), b($, {
|
|
241
|
+
key: `${e.prop}-${v.enabled}${e.type ? `-${e.type}` : ""}${e.required ? `-${e.required}` : ""}`,
|
|
238
242
|
label: e.label,
|
|
239
243
|
width: e.width,
|
|
240
244
|
"dict-type": e.dictType,
|
|
@@ -244,16 +248,16 @@ function q(n, a, o, g, _, F) {
|
|
|
244
248
|
options: e.options,
|
|
245
249
|
"show-overflow-tooltip": !e.editable && e.showOverflowTooltip
|
|
246
250
|
}, {
|
|
247
|
-
header:
|
|
248
|
-
default:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
+
header: F(() => [!n.disabled && e.required ? (k(), S("span", G, "*")) : x("v-if", !0), C("span", { title: e.label }, N(e.label), 9, K)]),
|
|
252
|
+
default: F(({ row: t, column: r, $index: i }) => [
|
|
253
|
+
x("tag 插槽"),
|
|
254
|
+
j(n.$slots, "tag", {
|
|
251
255
|
row: t,
|
|
252
256
|
column: r,
|
|
253
257
|
index: i
|
|
254
258
|
}),
|
|
255
|
-
|
|
256
|
-
|
|
259
|
+
x("列默认插槽,名字和 prop 保持一致"),
|
|
260
|
+
j(n.$slots, e.prop, {
|
|
257
261
|
row: t,
|
|
258
262
|
column: r,
|
|
259
263
|
wrapCol: !1,
|
|
@@ -263,16 +267,16 @@ function q(n, a, o, g, _, F) {
|
|
|
263
267
|
editable: e.editable
|
|
264
268
|
}, () => {
|
|
265
269
|
var a;
|
|
266
|
-
return [
|
|
270
|
+
return [v.enabled && e.editable === !0 ? (k(), S(y, { key: 0 }, [v.getCellType(t, e) === "input" ? (k(), b(V, D({
|
|
267
271
|
key: 0,
|
|
268
272
|
"wrap-col": !1,
|
|
269
273
|
"model-value": t[r.property]
|
|
270
|
-
}, { ref_for: !0 },
|
|
271
|
-
disabled:
|
|
274
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
275
|
+
disabled: v.isInputDisabled(t, e),
|
|
272
276
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
273
277
|
required: e.required,
|
|
274
|
-
onBlur: () =>
|
|
275
|
-
onInput: (n) =>
|
|
278
|
+
onBlur: () => v.onBlur(t, e),
|
|
279
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
276
280
|
}), null, 16, [
|
|
277
281
|
"model-value",
|
|
278
282
|
"disabled",
|
|
@@ -280,64 +284,135 @@ function q(n, a, o, g, _, F) {
|
|
|
280
284
|
"required",
|
|
281
285
|
"onBlur",
|
|
282
286
|
"onInput"
|
|
283
|
-
])) :
|
|
287
|
+
])) : v.getCellType(t, e) === "checkbox1" ? (k(), b(Y, D({
|
|
284
288
|
key: 1,
|
|
285
289
|
"wrap-col": !1,
|
|
286
290
|
"model-value": t[r.property]
|
|
287
|
-
}, { ref_for: !0 },
|
|
288
|
-
disabled:
|
|
291
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
292
|
+
disabled: v.isInputDisabled(t, e),
|
|
289
293
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
290
294
|
required: e.required,
|
|
291
|
-
onInput: (n) =>
|
|
295
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
292
296
|
}), null, 16, [
|
|
293
297
|
"model-value",
|
|
294
298
|
"disabled",
|
|
295
299
|
"prop",
|
|
296
300
|
"required",
|
|
297
301
|
"onInput"
|
|
298
|
-
])) :
|
|
302
|
+
])) : v.getCellType(t, e) === "inputPhoneNumber" ? (k(), b(X, D({
|
|
299
303
|
key: 2,
|
|
300
304
|
"wrap-col": !1,
|
|
301
305
|
"model-value": t[r.property]
|
|
302
|
-
}, { ref_for: !0 },
|
|
303
|
-
disabled:
|
|
306
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
307
|
+
disabled: v.isInputDisabled(t, e),
|
|
308
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
309
|
+
required: e.required,
|
|
310
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
311
|
+
}), null, 16, [
|
|
312
|
+
"model-value",
|
|
313
|
+
"disabled",
|
|
314
|
+
"prop",
|
|
315
|
+
"required",
|
|
316
|
+
"onInput"
|
|
317
|
+
])) : v.getCellType(t, e) === "user" ? (k(), S(y, { key: 3 }, [e.single ? (k(), b(Z, D({
|
|
318
|
+
key: 0,
|
|
319
|
+
id: t[r.idProp || `${r.property}Id`],
|
|
320
|
+
"onUpdate:id": (e) => t[r.idProp || `${r.property}Id`] = e,
|
|
321
|
+
name: t[r.property],
|
|
322
|
+
"onUpdate:name": (e) => t[r.property] = e,
|
|
323
|
+
"wrap-col": !1
|
|
324
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
325
|
+
disabled: v.isInputDisabled(t, e),
|
|
326
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
327
|
+
required: e.required,
|
|
328
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
329
|
+
}), null, 16, [
|
|
330
|
+
"id",
|
|
331
|
+
"onUpdate:id",
|
|
332
|
+
"name",
|
|
333
|
+
"onUpdate:name",
|
|
334
|
+
"disabled",
|
|
335
|
+
"prop",
|
|
336
|
+
"required",
|
|
337
|
+
"onInput"
|
|
338
|
+
])) : (k(), b(Z, D({
|
|
339
|
+
key: 1,
|
|
340
|
+
"wrap-col": !1,
|
|
341
|
+
"model-value": t[r.property]
|
|
342
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
343
|
+
disabled: v.isInputDisabled(t, e),
|
|
344
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
345
|
+
required: e.required,
|
|
346
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
347
|
+
}), null, 16, [
|
|
348
|
+
"model-value",
|
|
349
|
+
"disabled",
|
|
350
|
+
"prop",
|
|
351
|
+
"required",
|
|
352
|
+
"onInput"
|
|
353
|
+
]))], 64)) : v.getCellType(t, e) === "department" ? (k(), S(y, { key: 4 }, [e.single ? (k(), b(Q, D({
|
|
354
|
+
key: 0,
|
|
355
|
+
name: t[r.property],
|
|
356
|
+
"onUpdate:name": (e) => t[r.property] = e,
|
|
357
|
+
"wrap-col": !1,
|
|
358
|
+
"ou-type": e.ouType
|
|
359
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
360
|
+
disabled: v.isInputDisabled(t, e),
|
|
361
|
+
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
362
|
+
required: e.required,
|
|
363
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
364
|
+
}), null, 16, [
|
|
365
|
+
"name",
|
|
366
|
+
"onUpdate:name",
|
|
367
|
+
"ou-type",
|
|
368
|
+
"disabled",
|
|
369
|
+
"prop",
|
|
370
|
+
"required",
|
|
371
|
+
"onInput"
|
|
372
|
+
])) : (k(), b(Q, D({
|
|
373
|
+
key: 1,
|
|
374
|
+
"wrap-col": !1,
|
|
375
|
+
"model-value": t[r.property]
|
|
376
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
377
|
+
disabled: v.isInputDisabled(t, e),
|
|
304
378
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
305
379
|
required: e.required,
|
|
306
|
-
onInput: (n) =>
|
|
380
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
307
381
|
}), null, 16, [
|
|
308
382
|
"model-value",
|
|
309
383
|
"disabled",
|
|
310
384
|
"prop",
|
|
311
385
|
"required",
|
|
312
386
|
"onInput"
|
|
313
|
-
]))
|
|
387
|
+
]))], 64)) : v.getCellType(t, e) === "select" ? (k(), b(te, D({
|
|
388
|
+
key: 5,
|
|
314
389
|
"wrap-col": !1,
|
|
315
390
|
"model-value": t[r.property]
|
|
316
|
-
}, { ref_for: !0 },
|
|
317
|
-
disabled:
|
|
391
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
392
|
+
disabled: v.isInputDisabled(t, e),
|
|
318
393
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
319
394
|
required: e.required,
|
|
320
|
-
onInput: (n) =>
|
|
395
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
321
396
|
}), null, 16, [
|
|
322
397
|
"model-value",
|
|
323
398
|
"disabled",
|
|
324
399
|
"prop",
|
|
325
400
|
"required",
|
|
326
401
|
"onInput"
|
|
327
|
-
])
|
|
328
|
-
key:
|
|
402
|
+
])) : v.getCellType(t, e) === "datePicker" ? (k(), b(ne, D({
|
|
403
|
+
key: 6,
|
|
329
404
|
ref_for: !0
|
|
330
|
-
},
|
|
405
|
+
}, v.getInputAttr(t, e), {
|
|
331
406
|
start: t[e.start],
|
|
332
407
|
"onUpdate:start": (n) => t[e.start] = n,
|
|
333
408
|
end: t[e.end],
|
|
334
409
|
"onUpdate:end": (n) => t[e.end] = n,
|
|
335
410
|
"wrap-col": !1,
|
|
336
411
|
"model-value": t[r.property],
|
|
337
|
-
disabled:
|
|
412
|
+
disabled: v.isInputDisabled(t, e),
|
|
338
413
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
339
414
|
required: e.required,
|
|
340
|
-
onInput: (n) =>
|
|
415
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
341
416
|
}), null, 16, [
|
|
342
417
|
"start",
|
|
343
418
|
"onUpdate:start",
|
|
@@ -348,17 +423,17 @@ function q(n, a, o, g, _, F) {
|
|
|
348
423
|
"prop",
|
|
349
424
|
"required",
|
|
350
425
|
"onInput"
|
|
351
|
-
])) :
|
|
352
|
-
key:
|
|
426
|
+
])) : v.getCellType(t, e) === "cascader" ? (k(), b(re, D({
|
|
427
|
+
key: 7,
|
|
353
428
|
"wrap-col": !1,
|
|
354
429
|
"model-value": t[r.property]
|
|
355
|
-
}, { ref_for: !0 },
|
|
356
|
-
disabled:
|
|
430
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
431
|
+
disabled: v.isInputDisabled(t, e),
|
|
357
432
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
358
433
|
required: e.required,
|
|
359
434
|
"label-key": e.labelKey,
|
|
360
435
|
"value-key": e.valueKey,
|
|
361
|
-
onInput: (n) =>
|
|
436
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
362
437
|
}), null, 16, [
|
|
363
438
|
"model-value",
|
|
364
439
|
"disabled",
|
|
@@ -367,37 +442,37 @@ function q(n, a, o, g, _, F) {
|
|
|
367
442
|
"label-key",
|
|
368
443
|
"value-key",
|
|
369
444
|
"onInput"
|
|
370
|
-
])) :
|
|
371
|
-
key:
|
|
445
|
+
])) : v.getCellType(t, e) === "checkbox" ? (k(), b(ie, D({
|
|
446
|
+
key: 8,
|
|
372
447
|
"wrap-col": !1,
|
|
373
448
|
"model-value": t[r.property]
|
|
374
|
-
}, { ref_for: !0 },
|
|
375
|
-
disabled:
|
|
449
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
450
|
+
disabled: v.isInputDisabled(t, e),
|
|
376
451
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
377
452
|
required: e.required,
|
|
378
|
-
onInput: (n) =>
|
|
453
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
379
454
|
}), null, 16, [
|
|
380
455
|
"model-value",
|
|
381
456
|
"disabled",
|
|
382
457
|
"prop",
|
|
383
458
|
"required",
|
|
384
459
|
"onInput"
|
|
385
|
-
])) :
|
|
386
|
-
key:
|
|
460
|
+
])) : v.getCellType(t, e) === "number" ? (k(), b(ae, D({
|
|
461
|
+
key: 9,
|
|
387
462
|
"wrap-col": !1,
|
|
388
463
|
"model-value": t[r.property]
|
|
389
|
-
}, { ref_for: !0 },
|
|
390
|
-
disabled:
|
|
464
|
+
}, { ref_for: !0 }, v.getInputAttr(t, e), {
|
|
465
|
+
disabled: v.isInputDisabled(t, e),
|
|
391
466
|
prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
|
|
392
467
|
required: e.required,
|
|
393
|
-
onInput: (n) =>
|
|
468
|
+
onInput: (n) => v.onInput(t, n, e)
|
|
394
469
|
}), null, 16, [
|
|
395
470
|
"model-value",
|
|
396
471
|
"disabled",
|
|
397
472
|
"prop",
|
|
398
473
|
"required",
|
|
399
474
|
"onInput"
|
|
400
|
-
])) :
|
|
475
|
+
])) : x("v-if", !0)], 64)) : e.dictType || (a = e.options) != null && a.length ? (k(), b(oe, {
|
|
401
476
|
key: 1,
|
|
402
477
|
"dict-type": e.dictType,
|
|
403
478
|
"id-as-value": e.idAsValue,
|
|
@@ -412,7 +487,7 @@ function q(n, a, o, g, _, F) {
|
|
|
412
487
|
"column",
|
|
413
488
|
"row",
|
|
414
489
|
"options"
|
|
415
|
-
])) : (
|
|
490
|
+
])) : (k(), S(y, { key: 2 }, [T(N(v.getVal(t, r, e)), 1)], 64))];
|
|
416
491
|
})
|
|
417
492
|
]),
|
|
418
493
|
_: 2
|
|
@@ -426,24 +501,24 @@ function q(n, a, o, g, _, F) {
|
|
|
426
501
|
"options",
|
|
427
502
|
"show-overflow-tooltip"
|
|
428
503
|
]))), 128))]),
|
|
429
|
-
|
|
430
|
-
add:
|
|
431
|
-
remove:
|
|
504
|
+
j(n.$slots, "handle", {
|
|
505
|
+
add: v.add,
|
|
506
|
+
remove: v.remove
|
|
432
507
|
}),
|
|
433
|
-
!n.disabled &&
|
|
508
|
+
!n.disabled && v.hasHandleMenus ? (k(), b($, {
|
|
434
509
|
key: 0,
|
|
435
510
|
label: "操作",
|
|
436
511
|
width: "80",
|
|
437
512
|
align: "center",
|
|
438
513
|
prop: "menu"
|
|
439
514
|
}, {
|
|
440
|
-
header:
|
|
515
|
+
header: F(({ column: e, $index: t }) => [j(n.$slots, "handle-column-header", {
|
|
441
516
|
column: e,
|
|
442
517
|
index: t
|
|
443
|
-
}, () => [
|
|
444
|
-
default:
|
|
518
|
+
}, () => [T(N(e.label), 1)])]),
|
|
519
|
+
default: F(({ row: e, $index: t }) => {
|
|
445
520
|
var r, i, a;
|
|
446
|
-
return [(r = n.handleMenus) != null && r.includes("add") && ((i = n.modelValue) == null ? void 0 : i.length) < n.limit ? (
|
|
521
|
+
return [(r = n.handleMenus) != null && r.includes("add") && ((i = n.modelValue) == null ? void 0 : i.length) < n.limit ? (k(), S("i", {
|
|
447
522
|
key: 0,
|
|
448
523
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
449
524
|
style: {
|
|
@@ -452,87 +527,87 @@ function q(n, a, o, g, _, F) {
|
|
|
452
527
|
cursor: "pointer"
|
|
453
528
|
},
|
|
454
529
|
title: "添加",
|
|
455
|
-
onClick:
|
|
456
|
-
}, null, 8,
|
|
530
|
+
onClick: I((n) => v.add(e, t), ["stop"])
|
|
531
|
+
}, null, 8, q)) : x("v-if", !0), (a = n.handleMenus) != null && a.includes("delete") ? (k(), b(se, {
|
|
457
532
|
key: 1,
|
|
458
533
|
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
459
534
|
title: "删除",
|
|
460
535
|
message: "您确定要删除该行吗?",
|
|
461
|
-
onClick:
|
|
462
|
-
}, null, 8, ["onClick"])) :
|
|
536
|
+
onClick: I((n) => v.remove(e, t), ["stop"])
|
|
537
|
+
}, null, 8, ["onClick"])) : x("v-if", !0)];
|
|
463
538
|
}),
|
|
464
539
|
_: 3
|
|
465
|
-
})) :
|
|
540
|
+
})) : x("v-if", !0)
|
|
466
541
|
]),
|
|
467
542
|
_: 2
|
|
468
|
-
}, [!n.disabled ||
|
|
543
|
+
}, [!n.disabled || v.hasToolBarMenu ? {
|
|
469
544
|
name: "toolbar",
|
|
470
|
-
fn:
|
|
471
|
-
addRow:
|
|
472
|
-
delRow:
|
|
473
|
-
refresh:
|
|
474
|
-
}, () => [
|
|
475
|
-
addRow:
|
|
476
|
-
delRow:
|
|
477
|
-
refresh:
|
|
545
|
+
fn: F(() => [C("div", H, [j(n.$slots, "toolbar", {
|
|
546
|
+
addRow: v.addRow,
|
|
547
|
+
delRow: v.delRow,
|
|
548
|
+
refresh: v.refresh
|
|
549
|
+
}, () => [C("div", U, [j(n.$slots, "toolbar-left", {
|
|
550
|
+
addRow: v.addRow,
|
|
551
|
+
delRow: v.delRow,
|
|
552
|
+
refresh: v.refresh
|
|
478
553
|
}, () => {
|
|
479
554
|
var e, t, r;
|
|
480
555
|
return [
|
|
481
|
-
(e = n.toolbarMenus) != null && e.includes("add") ? (
|
|
556
|
+
(e = n.toolbarMenus) != null && e.includes("add") ? (k(), b(z, {
|
|
482
557
|
key: 0,
|
|
483
558
|
class: "table-header-button add",
|
|
484
559
|
icon: "el-icon-circle-plus",
|
|
485
560
|
type: "text",
|
|
486
|
-
onClick:
|
|
561
|
+
onClick: v.addRow
|
|
487
562
|
}, {
|
|
488
|
-
default:
|
|
563
|
+
default: F(() => [...i[2] || (i[2] = [T(" 添加 ", -1)])]),
|
|
489
564
|
_: 1
|
|
490
|
-
}, 8, ["onClick"])) :
|
|
491
|
-
(t = n.toolbarMenus) != null && t.includes("delete") ? (
|
|
565
|
+
}, 8, ["onClick"])) : x("v-if", !0),
|
|
566
|
+
(t = n.toolbarMenus) != null && t.includes("delete") ? (k(), b(B, {
|
|
492
567
|
key: 1,
|
|
493
568
|
disabled: _.selectedRows.length <= 0,
|
|
494
569
|
class: "table-header-button remove",
|
|
495
570
|
message: "您确定要删除选中的记录吗?",
|
|
496
571
|
icon: "el-icon-error",
|
|
497
572
|
type: "text",
|
|
498
|
-
onClick:
|
|
573
|
+
onClick: v.delRow
|
|
499
574
|
}, {
|
|
500
|
-
default:
|
|
575
|
+
default: F(() => [...i[3] || (i[3] = [T(" 删除 ", -1)])]),
|
|
501
576
|
_: 1
|
|
502
|
-
}, 8, ["disabled", "onClick"])) :
|
|
503
|
-
(r = n.toolbarMenus) != null && r.includes("refresh") ? (
|
|
577
|
+
}, 8, ["disabled", "onClick"])) : x("v-if", !0),
|
|
578
|
+
(r = n.toolbarMenus) != null && r.includes("refresh") ? (k(), b(z, {
|
|
504
579
|
key: 2,
|
|
505
580
|
class: "table-header-button refresh",
|
|
506
581
|
icon: "el-icon-refresh-left",
|
|
507
582
|
type: "text",
|
|
508
583
|
disabled: !1,
|
|
509
|
-
onClick:
|
|
584
|
+
onClick: v.refresh
|
|
510
585
|
}, {
|
|
511
|
-
default:
|
|
586
|
+
default: F(() => [...i[4] || (i[4] = [T(" 刷新 ", -1)])]),
|
|
512
587
|
_: 1
|
|
513
|
-
}, 8, ["onClick"])) :
|
|
588
|
+
}, 8, ["onClick"])) : x("v-if", !0)
|
|
514
589
|
];
|
|
515
|
-
}),
|
|
516
|
-
addRow:
|
|
517
|
-
delRow:
|
|
518
|
-
refresh:
|
|
519
|
-
})]),
|
|
520
|
-
removeSelectedRows:
|
|
590
|
+
}), j(n.$slots, "toolbar-left-append", {
|
|
591
|
+
addRow: v.addRow,
|
|
592
|
+
delRow: v.delRow,
|
|
593
|
+
refresh: v.refresh
|
|
594
|
+
})]), C("div", W, [j(n.$slots, "toolbar-right", {
|
|
595
|
+
removeSelectedRows: v.removeSelectedRows,
|
|
521
596
|
selectedRows: _.selectedRows
|
|
522
597
|
})])])])]),
|
|
523
598
|
key: "0"
|
|
524
599
|
} : void 0, n.bottomAddButton ? {
|
|
525
600
|
name: "empty",
|
|
526
|
-
fn:
|
|
601
|
+
fn: F(() => [C("i", {
|
|
527
602
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
528
603
|
style: {
|
|
529
604
|
"font-size": "20px",
|
|
530
605
|
cursor: "pointer"
|
|
531
606
|
},
|
|
532
607
|
title: "添加",
|
|
533
|
-
onClick:
|
|
608
|
+
onClick: i[0] || (i[0] = I((e) => {
|
|
534
609
|
var t;
|
|
535
|
-
return
|
|
610
|
+
return v.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
|
|
536
611
|
}, ["stop"]))
|
|
537
612
|
})]),
|
|
538
613
|
key: "1"
|
|
@@ -548,21 +623,21 @@ function q(n, a, o, g, _, F) {
|
|
|
548
623
|
"index",
|
|
549
624
|
"onSelectionChange"
|
|
550
625
|
]),
|
|
551
|
-
|
|
552
|
-
!n.disabled && n.bottomAddButton && ((
|
|
626
|
+
x("底部添加按钮"),
|
|
627
|
+
!n.disabled && n.bottomAddButton && ((L = n.modelValue) == null ? void 0 : L.length) < n.limit && ((R = n.modelValue) == null ? void 0 : R.length) > 0 ? (k(), S("div", J, [C("i", {
|
|
553
628
|
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
554
629
|
style: {
|
|
555
630
|
"font-size": "20px",
|
|
556
631
|
cursor: "pointer"
|
|
557
632
|
},
|
|
558
633
|
title: "添加",
|
|
559
|
-
onClick:
|
|
634
|
+
onClick: i[1] || (i[1] = I((e) => {
|
|
560
635
|
var t;
|
|
561
|
-
return
|
|
636
|
+
return v.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
|
|
562
637
|
}, ["stop"]))
|
|
563
|
-
})])) :
|
|
638
|
+
})])) : x("v-if", !0)
|
|
564
639
|
], 2);
|
|
565
640
|
}
|
|
566
|
-
var
|
|
641
|
+
var X = /* @__PURE__ */ o(V, [["render", Y]]);
|
|
567
642
|
//#endregion
|
|
568
|
-
export {
|
|
643
|
+
export { B as n, X as t };
|
|
@@ -3,7 +3,7 @@ import { i as t, n } from "./D_qiRmiE.mjs";
|
|
|
3
3
|
import { n as r, t as i } from "./CJdkjadi.mjs";
|
|
4
4
|
import { r as a } from "./CabldOLo.mjs";
|
|
5
5
|
import { n as o } from "./gCeDFHo1.mjs";
|
|
6
|
-
import { n as s, t as c } from "./
|
|
6
|
+
import { n as s, t as c } from "./BG8z3V9d2.mjs";
|
|
7
7
|
import { isArray as l, isString as u, trace as d, warning as f } from "@web-utils/core";
|
|
8
8
|
import { computed as p, createVNode as m, getCurrentInstance as h, mergeProps as g, useModel as _, useTemplateRef as v } from "vue";
|
|
9
9
|
import { useEventBus as y } from "@web-utils/vue/hooks/useEventBus";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as e } from "./DcTVYqeJ.mjs";
|
|
2
2
|
import { goBack as t, hasAuthority as n } from "../api/index.mjs";
|
|
3
3
|
import { toolbarContextKey as r } from "../constants/index.mjs";
|
|
4
|
-
import { t as i } from "./
|
|
4
|
+
import { t as i } from "./Dt3lfDnL.mjs";
|
|
5
5
|
import { NOOP as a, capitalize as o } from "@web-utils/core";
|
|
6
6
|
import { Comment as s, createVNode as c } from "vue";
|
|
7
7
|
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as e, t } from "./DcTVYqeJ.mjs";
|
|
2
|
-
import { t as n } from "./
|
|
2
|
+
import { t as n } from "./Dt3lfDnL.mjs";
|
|
3
3
|
import { t as r } from "./CkOD-_VV.mjs";
|
|
4
4
|
import { computePosition as i, delay as a, fastClone as o, findTreeChildren as s, hasOwn as c, isFunction as l, isNotEmpty as u, isPlainObject as d, isUndefined as f, isVerticalScrollbarVisible as p, patch as m, scrollbarWidth as h } from "@web-utils/core";
|
|
5
5
|
import { Fragment as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, mergeProps as C, normalizeClass as w, normalizeStyle as T, openBlock as E, renderSlot as D, toDisplayString as O, toHandlers as k, vShow as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
|