@web-utils/form-ui 1.0.0-beta51 → 1.0.0-beta52

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.
Files changed (103) hide show
  1. package/chunks/{eae6huQB.mjs → B1k8ydde.mjs} +2 -2
  2. package/chunks/{B1IPSTA6.mjs → B75qfA0z.mjs} +2 -2
  3. package/chunks/{pIzhYsBe.mjs → BAw6wxW1.mjs} +2 -2
  4. package/chunks/{B9gA65rt2.mjs → BSU2FqMP2.mjs} +2 -2
  5. package/chunks/{DA7oGHSX.mjs → BXVB-H8_.mjs} +2 -2
  6. package/chunks/B_RAcbs_.mjs +108 -0
  7. package/chunks/{BtcjAHE6.mjs → BshE3RnA.mjs} +2 -2
  8. package/chunks/{CuAoMR3n.mjs → C6hLXCPk.mjs} +5 -16
  9. package/chunks/{CAd1zK9Q.mjs → CBFbSsTJ.mjs} +2 -2
  10. package/chunks/CGDnQr1c.mjs +67 -0
  11. package/chunks/CGHcOyNC2.mjs +87 -0
  12. package/chunks/{ByHz4mmh.mjs → CVKPpQdS.mjs} +2 -2
  13. package/chunks/{BG8z3V9d2.mjs → CjRZ71IY2.mjs} +47 -178
  14. package/chunks/CkjtCuMs.mjs +416 -0
  15. package/chunks/{D_Fs3bkZ.mjs → CtHmTtVP.mjs} +2 -2
  16. package/chunks/{V2p-PCpL.mjs → CzHaJsnD.mjs} +3 -3
  17. package/chunks/{Bwbtu2cp.mjs → D2MB3CnR.mjs} +2 -2
  18. package/chunks/{D_qiRmiE.mjs → D3mFJzGr.mjs} +32 -26
  19. package/chunks/{BbSPWDDZ.mjs → DLgFBI_X.mjs} +2 -2
  20. package/chunks/{BfxDxIg0.mjs → DVbw6xIr.mjs} +2 -2
  21. package/chunks/{BQk3-Ppb2.mjs → DZJ-ShZA2.mjs} +38 -39
  22. package/chunks/{CqVd8D222.mjs → DcFllKOf2.mjs} +2 -2
  23. package/chunks/DhVmHzB7.mjs +653 -0
  24. package/chunks/{6yfBZFOB.mjs → DitpKWMd.mjs} +4 -3
  25. package/chunks/{bFbPPcdq.mjs → DkXlFWjs.mjs} +2 -2
  26. package/chunks/{DKwp6AMl.mjs → GMFHxPJq.mjs} +2 -2
  27. package/chunks/{BqWvBF14.mjs → JKFepPeL.mjs} +2 -2
  28. package/chunks/{CJdkjadi.mjs → KuAMIZnG.mjs} +1 -1
  29. package/chunks/{BBERmTup.mjs → XoImEoke.mjs} +19 -4
  30. package/chunks/{wXeqV-_7.mjs → eBESsR-G.mjs} +2 -2
  31. package/chunks/{CabldOLo.mjs → v-O82KSn.mjs} +4 -3
  32. package/element-dialog/index.d.ts +2 -2
  33. package/form-cascader/index.d.ts +8 -2
  34. package/form-cascader/index.mjs +1 -1
  35. package/form-checkbox/index.d.ts +8 -2
  36. package/form-checkbox/index.mjs +1 -1
  37. package/form-checkbox-group/index.d.ts +8 -2
  38. package/form-checkbox-group/index.mjs +1 -1
  39. package/form-date-picker/index.d.ts +8 -2
  40. package/form-date-picker/index.mjs +1 -1
  41. package/form-image/index.d.ts +8 -2
  42. package/form-image/index.mjs +1 -1
  43. package/form-input/index.d.ts +8 -2
  44. package/form-input/index.mjs +1 -1
  45. package/form-input-cron-expression/index.d.ts +8 -2
  46. package/form-input-cron-expression/index.mjs +1 -1
  47. package/form-input-email/index.d.ts +8 -2
  48. package/form-input-email/index.mjs +1 -1
  49. package/form-input-id-card/index.d.ts +8 -2
  50. package/form-input-id-card/index.mjs +1 -1
  51. package/form-input-number/index.d.ts +8 -2
  52. package/form-input-number/index.mjs +1 -1
  53. package/form-input-phone-number/index.d.ts +8 -2
  54. package/form-input-phone-number/index.mjs +1 -1
  55. package/form-input-tag/index.d.ts +8 -2
  56. package/form-input-tag/index.mjs +1 -1
  57. package/form-input-time/index.d.ts +8 -2
  58. package/form-input-time/index.mjs +1 -1
  59. package/form-item-group/index.mjs +1 -1
  60. package/form-item-x/index.d.ts +8 -2
  61. package/form-item-x/index.mjs +1 -1
  62. package/form-radio-group/index.d.ts +8 -2
  63. package/form-radio-group/index.mjs +1 -1
  64. package/form-rate/index.d.ts +8 -2
  65. package/form-rate/index.mjs +1 -1
  66. package/form-select/index.d.ts +8 -2
  67. package/form-select/index.mjs +1 -1
  68. package/form-slider/index.d.ts +8 -2
  69. package/form-slider/index.mjs +1 -1
  70. package/form-switch/index.d.ts +8 -2
  71. package/form-switch/index.mjs +1 -1
  72. package/form-table/index.d.ts +43 -25
  73. package/form-table/index.mjs +1 -1
  74. package/form-table-plus/index.d.ts +8 -8
  75. package/form-table-plus/index.mjs +1 -1
  76. package/form-text/index.d.ts +8 -2
  77. package/form-text/index.mjs +1 -1
  78. package/form-textarea/index.d.ts +12 -12
  79. package/form-textarea/index.mjs +1 -1
  80. package/form-time-select/index.d.ts +8 -2
  81. package/form-time-select/index.mjs +1 -1
  82. package/helper/sub-table-plus.d.ts +38 -0
  83. package/helper/sub-table-plus.mjs +4 -0
  84. package/index.mjs +29 -29
  85. package/package.json +1 -1
  86. package/pageable-table/index.d.ts +11 -11
  87. package/pageable-table/index.mjs +1 -1
  88. package/sub-table/index.d.ts +36 -30
  89. package/sub-table/index.mjs +2 -537
  90. package/sub-table-plus/index.d.ts +11 -2
  91. package/sub-table-plus/index.mjs +1 -1
  92. package/table-column/index.d.ts +8 -5
  93. package/table-column/index.mjs +1 -1
  94. package/table-column-def/index.d.ts +14 -12
  95. package/table-column-def/index.mjs +1 -1
  96. package/table-view/index.d.ts +4 -0
  97. package/table-view/index.mjs +13 -5
  98. package/web-types.json +1 -1
  99. package/chunks/BsZgAJX_2.mjs +0 -81
  100. package/chunks/YFiU0ngn.mjs +0 -622
  101. package/chunks/gCeDFHo1.mjs +0 -32
  102. package/chunks/hlha6Bhc.mjs +0 -107
  103. package/chunks/wDS9KBFw.mjs +0 -67
@@ -5,16 +5,16 @@ import { t as r } from "./DOZRzqlo.mjs";
5
5
  import { cellClickHandlerContextKey as i } from "../constants/index.mjs";
6
6
  import { t as a } from "./Dt3lfDnL.mjs";
7
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";
13
- import { t as d } from "./B1IPSTA6.mjs";
14
- import { t as f } from "./BbSPWDDZ.mjs";
15
- import { t as p } from "./bFbPPcdq.mjs";
16
- import { t as m } from "./BtcjAHE6.mjs";
17
- import { t as h } from "./YFiU0ngn.mjs";
8
+ import { n as s } from "./D3mFJzGr.mjs";
9
+ import { t as c } from "./D2MB3CnR.mjs";
10
+ import { t as l } from "./eBESsR-G.mjs";
11
+ import { t as u } from "./v-O82KSn.mjs";
12
+ import { t as ee } from "./CzHaJsnD.mjs";
13
+ import { t as d } from "./B75qfA0z.mjs";
14
+ import { t as f } from "./DLgFBI_X.mjs";
15
+ import { t as p } from "./DkXlFWjs.mjs";
16
+ import { t as m } from "./BshE3RnA.mjs";
17
+ import { t as h } from "./DhVmHzB7.mjs";
18
18
  import g from "../table-column-def/index.mjs";
19
19
  import { findTreeChildren as _, isFunction as v } from "@web-utils/core";
20
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";
@@ -119,15 +119,13 @@ var B = {
119
119
  getCellType(e, t) {
120
120
  return v(t.getType) ? t.getType(e, t) : t.type;
121
121
  },
122
- getInputAttr(e, t) {
123
- return t.attrs && t.getAttrs ? {
122
+ getInputAttr(e, t, n) {
123
+ var r;
124
+ let i = {};
125
+ return t.attrs && t.getAttrs ? i = {
124
126
  ...t.attrs,
125
127
  ...t.getAttrs(e)
126
- } : t.attrs ? t.attrs : t.getAttrs ? t.getAttrs(e) : {};
127
- },
128
- isInputDisabled(e, t) {
129
- var n;
130
- return (n = t.isDisabled) == null ? void 0 : n.call(t, e);
128
+ } : t.attrs ? i = { ...t.attrs } : t.getAttrs && (i = t.getAttrs(e)), i.wrapCol = !1, i.label = t.label, i.ouType = t.ouType, i.labelKey = t.labelKey, i.valueKey = t.valueKey, i.required = t.required, i.prop = this.prop ? `${this.prop}[${n}].${t.prop}` : null, i.modelValue = e[t.prop], i.disabled = (r = t.isDisabled) == null ? void 0 : r.call(t, e), i;
131
129
  },
132
130
  onInput(e, t, n) {
133
131
  n.setValue ? n.setValue(e, t, n, this.rows) : n.setVal !== !1 && (e[n.prop] = t);
@@ -178,6 +176,7 @@ var B = {
178
176
  },
179
177
  getVal(e, t, n) {
180
178
  var r, i;
179
+ if (v(n.getVal)) return n.getVal(e, t, n);
181
180
  if (n.type === "select" && (r = n.attrs) != null && r.options) {
182
181
  let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
183
182
  if (r) return r.label || r.name;
@@ -234,11 +233,13 @@ function Y(n, i, o, s, _, v) {
234
233
  "selection-width": n.selectionWidth,
235
234
  "hide-on-single-page": "",
236
235
  selection: n.selection,
237
- index: n.index
236
+ index: n.index,
237
+ "row-db-click": v.rowDbClick,
238
+ onRowDblclick: v.rowDbClick
238
239
  }, P(v.listeners), { onSelectionChange: v.onSelectionChange }), w({
239
240
  default: F(() => [
240
241
  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}` : ""}`,
242
+ key: e.prop,
242
243
  label: e.label,
243
244
  width: e.width,
244
245
  "dict-type": e.dictType,
@@ -266,213 +267,79 @@ function Y(n, i, o, s, _, v) {
266
267
  required: e.required,
267
268
  editable: e.editable
268
269
  }, () => {
269
- var a;
270
+ var n;
270
271
  return [v.enabled && e.editable === !0 ? (k(), S(y, { key: 0 }, [v.getCellType(t, e) === "input" ? (k(), b(V, D({
271
272
  key: 0,
272
- "wrap-col": !1,
273
- "model-value": t[r.property]
274
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
275
- disabled: v.isInputDisabled(t, e),
276
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
277
- required: e.required,
273
+ ref_for: !0
274
+ }, v.getInputAttr(t, e, i), {
278
275
  onBlur: () => v.onBlur(t, e),
279
276
  onInput: (n) => v.onInput(t, n, e)
280
- }), null, 16, [
281
- "model-value",
282
- "disabled",
283
- "prop",
284
- "required",
285
- "onBlur",
286
- "onInput"
287
- ])) : v.getCellType(t, e) === "checkbox1" ? (k(), b(Y, D({
277
+ }), null, 16, ["onBlur", "onInput"])) : v.getCellType(t, e) === "checkbox1" ? (k(), b(Y, D({
288
278
  key: 1,
289
- "wrap-col": !1,
290
- "model-value": t[r.property]
291
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
292
- disabled: v.isInputDisabled(t, e),
293
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
294
- required: e.required,
295
- onInput: (n) => v.onInput(t, n, e)
296
- }), null, 16, [
297
- "model-value",
298
- "disabled",
299
- "prop",
300
- "required",
301
- "onInput"
302
- ])) : v.getCellType(t, e) === "inputPhoneNumber" ? (k(), b(X, D({
279
+ ref_for: !0
280
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : v.getCellType(t, e) === "inputPhoneNumber" ? (k(), b(X, D({
303
281
  key: 2,
304
- "wrap-col": !1,
305
- "model-value": t[r.property]
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({
282
+ ref_for: !0
283
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : v.getCellType(t, e) === "user" ? (k(), S(y, { key: 3 }, [e.single ? (k(), b(Z, D({
318
284
  key: 0,
285
+ ref_for: !0
286
+ }, v.getInputAttr(t, e, i), {
319
287
  id: t[r.idProp || `${r.property}Id`],
320
288
  "onUpdate:id": (e) => t[r.idProp || `${r.property}Id`] = e,
321
289
  name: t[r.property],
322
290
  "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
291
  onInput: (n) => v.onInput(t, n, e)
329
292
  }), null, 16, [
330
293
  "id",
331
294
  "onUpdate:id",
332
295
  "name",
333
296
  "onUpdate:name",
334
- "disabled",
335
- "prop",
336
- "required",
337
297
  "onInput"
338
298
  ])) : (k(), b(Z, D({
339
299
  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({
300
+ ref_for: !0
301
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"]))], 64)) : v.getCellType(t, e) === "department" ? (k(), S(y, { key: 4 }, [e.single ? (k(), b(Q, D({
354
302
  key: 0,
303
+ ref_for: !0
304
+ }, v.getInputAttr(t, e, i), {
355
305
  name: t[r.property],
356
306
  "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
307
  onInput: (n) => v.onInput(t, n, e)
364
308
  }), null, 16, [
365
309
  "name",
366
310
  "onUpdate:name",
367
- "ou-type",
368
- "disabled",
369
- "prop",
370
- "required",
371
311
  "onInput"
372
312
  ])) : (k(), b(Q, D({
373
313
  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),
378
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
379
- required: e.required,
380
- onInput: (n) => v.onInput(t, n, e)
381
- }), null, 16, [
382
- "model-value",
383
- "disabled",
384
- "prop",
385
- "required",
386
- "onInput"
387
- ]))], 64)) : v.getCellType(t, e) === "select" ? (k(), b(te, D({
314
+ ref_for: !0
315
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"]))], 64)) : v.getCellType(t, e) === "select" ? (k(), b(te, D({
388
316
  key: 5,
389
- "wrap-col": !1,
390
- "model-value": t[r.property]
391
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
392
- disabled: v.isInputDisabled(t, e),
393
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
394
- required: e.required,
395
- onInput: (n) => v.onInput(t, n, e)
396
- }), null, 16, [
397
- "model-value",
398
- "disabled",
399
- "prop",
400
- "required",
401
- "onInput"
402
- ])) : v.getCellType(t, e) === "datePicker" ? (k(), b(ne, D({
317
+ ref_for: !0
318
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : v.getCellType(t, e) === "datePicker" ? (k(), b(ne, D({
403
319
  key: 6,
404
320
  ref_for: !0
405
- }, v.getInputAttr(t, e), {
321
+ }, v.getInputAttr(t, e, i), {
406
322
  start: t[e.start],
407
323
  "onUpdate:start": (n) => t[e.start] = n,
408
324
  end: t[e.end],
409
325
  "onUpdate:end": (n) => t[e.end] = n,
410
- "wrap-col": !1,
411
- "model-value": t[r.property],
412
- disabled: v.isInputDisabled(t, e),
413
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
414
- required: e.required,
415
326
  onInput: (n) => v.onInput(t, n, e)
416
327
  }), null, 16, [
417
328
  "start",
418
329
  "onUpdate:start",
419
330
  "end",
420
331
  "onUpdate:end",
421
- "model-value",
422
- "disabled",
423
- "prop",
424
- "required",
425
332
  "onInput"
426
333
  ])) : v.getCellType(t, e) === "cascader" ? (k(), b(re, D({
427
334
  key: 7,
428
- "wrap-col": !1,
429
- "model-value": t[r.property]
430
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
431
- disabled: v.isInputDisabled(t, e),
432
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
433
- required: e.required,
434
- "label-key": e.labelKey,
435
- "value-key": e.valueKey,
436
- onInput: (n) => v.onInput(t, n, e)
437
- }), null, 16, [
438
- "model-value",
439
- "disabled",
440
- "prop",
441
- "required",
442
- "label-key",
443
- "value-key",
444
- "onInput"
445
- ])) : v.getCellType(t, e) === "checkbox" ? (k(), b(ie, D({
335
+ ref_for: !0
336
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : v.getCellType(t, e) === "checkbox" ? (k(), b(ie, D({
446
337
  key: 8,
447
- "wrap-col": !1,
448
- "model-value": t[r.property]
449
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
450
- disabled: v.isInputDisabled(t, e),
451
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
452
- required: e.required,
453
- onInput: (n) => v.onInput(t, n, e)
454
- }), null, 16, [
455
- "model-value",
456
- "disabled",
457
- "prop",
458
- "required",
459
- "onInput"
460
- ])) : v.getCellType(t, e) === "number" ? (k(), b(ae, D({
338
+ ref_for: !0
339
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : v.getCellType(t, e) === "number" ? (k(), b(ae, D({
461
340
  key: 9,
462
- "wrap-col": !1,
463
- "model-value": t[r.property]
464
- }, { ref_for: !0 }, v.getInputAttr(t, e), {
465
- disabled: v.isInputDisabled(t, e),
466
- prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
467
- required: e.required,
468
- onInput: (n) => v.onInput(t, n, e)
469
- }), null, 16, [
470
- "model-value",
471
- "disabled",
472
- "prop",
473
- "required",
474
- "onInput"
475
- ])) : x("v-if", !0)], 64)) : e.dictType || (a = e.options) != null && a.length ? (k(), b(oe, {
341
+ ref_for: !0
342
+ }, v.getInputAttr(t, e, i), { onInput: (n) => v.onInput(t, n, e) }), null, 16, ["onInput"])) : (k(), S(y, { key: 10 }, [T(N(v.getVal(t, r, e)), 1)], 64))], 64)) : e.dictType || (n = e.options) != null && n.length ? (k(), b(oe, {
476
343
  key: 1,
477
344
  "dict-type": e.dictType,
478
345
  "id-as-value": e.idAsValue,
@@ -621,6 +488,8 @@ function Y(n, i, o, s, _, v) {
621
488
  "selection-width",
622
489
  "selection",
623
490
  "index",
491
+ "row-db-click",
492
+ "onRowDblclick",
624
493
  "onSelectionChange"
625
494
  ]),
626
495
  x("底部添加按钮"),