@web-utils/form-ui 1.0.0-beta50 → 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 (124) 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/{hzaYr6Ud2.mjs → BQyL45PF2.mjs} +1 -1
  5. package/chunks/{B9gA65rt2.mjs → BSU2FqMP2.mjs} +2 -2
  6. package/chunks/{Cln3RBAD.mjs → BWh6u1O0.mjs} +1 -1
  7. package/chunks/{DA7oGHSX.mjs → BXVB-H8_.mjs} +2 -2
  8. package/chunks/B_RAcbs_.mjs +108 -0
  9. package/chunks/{BtcjAHE6.mjs → BshE3RnA.mjs} +2 -2
  10. package/chunks/{CuAoMR3n.mjs → C6hLXCPk.mjs} +5 -16
  11. package/chunks/{vXQf89tS.mjs → C7G-cAoI.mjs} +1 -1
  12. package/chunks/{CAd1zK9Q.mjs → CBFbSsTJ.mjs} +2 -2
  13. package/chunks/CGDnQr1c.mjs +67 -0
  14. package/chunks/CGHcOyNC2.mjs +87 -0
  15. package/chunks/{ByHz4mmh.mjs → CVKPpQdS.mjs} +2 -2
  16. package/chunks/{BUGCiCnl.mjs → CXsoKP22.mjs} +4 -1
  17. package/chunks/CjRZ71IY2.mjs +512 -0
  18. package/chunks/CkjtCuMs.mjs +416 -0
  19. package/chunks/{D0Zg2CV0.mjs → CtHmTtVP.mjs} +3 -3
  20. package/chunks/{V2p-PCpL.mjs → CzHaJsnD.mjs} +3 -3
  21. package/chunks/{Dkd5BC98.mjs → D2MB3CnR.mjs} +2 -6
  22. package/chunks/{D_qiRmiE.mjs → D3mFJzGr.mjs} +32 -26
  23. package/chunks/{BbSPWDDZ.mjs → DLgFBI_X.mjs} +2 -2
  24. package/chunks/{BfxDxIg0.mjs → DVbw6xIr.mjs} +2 -2
  25. package/chunks/{kflKDW4T2.mjs → DZJ-ShZA2.mjs} +38 -39
  26. package/chunks/{CqoVAnxC2.mjs → DcFllKOf2.mjs} +2 -6
  27. package/chunks/DhVmHzB7.mjs +653 -0
  28. package/chunks/{6yfBZFOB.mjs → DitpKWMd.mjs} +4 -3
  29. package/chunks/{bFbPPcdq.mjs → DkXlFWjs.mjs} +2 -2
  30. package/chunks/{CxTg0r4n.mjs → Dt3lfDnL.mjs} +1 -1
  31. package/chunks/{BA2KEptL.mjs → GMFHxPJq.mjs} +2 -6
  32. package/chunks/{BqWvBF14.mjs → JKFepPeL.mjs} +2 -2
  33. package/chunks/{CJdkjadi.mjs → KuAMIZnG.mjs} +1 -1
  34. package/chunks/{BBERmTup.mjs → XoImEoke.mjs} +19 -4
  35. package/chunks/{wXeqV-_7.mjs → eBESsR-G.mjs} +2 -2
  36. package/chunks/{CabldOLo.mjs → v-O82KSn.mjs} +4 -3
  37. package/confirm-button/index.d.ts +9 -2
  38. package/confirm-button/index.mjs +1 -1
  39. package/confirmable/index.d.ts +9 -2
  40. package/confirmable/index.mjs +1 -1
  41. package/constants/index.d.ts +1 -0
  42. package/constants/index.mjs +2 -2
  43. package/editable-tree/index.mjs +1 -1
  44. package/element-dialog/index.d.ts +2 -2
  45. package/form-button/index.d.ts +9 -2
  46. package/form-cascader/index.d.ts +16 -10
  47. package/form-cascader/index.mjs +1 -1
  48. package/form-checkbox/index.d.ts +8 -2
  49. package/form-checkbox/index.mjs +1 -1
  50. package/form-checkbox-group/index.d.ts +8 -2
  51. package/form-checkbox-group/index.mjs +1 -1
  52. package/form-date-picker/index.d.ts +8 -2
  53. package/form-date-picker/index.mjs +1 -1
  54. package/form-image/index.d.ts +8 -2
  55. package/form-image/index.mjs +1 -1
  56. package/form-input/index.d.ts +8 -2
  57. package/form-input/index.mjs +1 -1
  58. package/form-input-cron-expression/index.d.ts +8 -2
  59. package/form-input-cron-expression/index.mjs +1 -1
  60. package/form-input-email/index.d.ts +8 -2
  61. package/form-input-email/index.mjs +1 -1
  62. package/form-input-id-card/index.d.ts +8 -2
  63. package/form-input-id-card/index.mjs +1 -1
  64. package/form-input-number/index.d.ts +8 -2
  65. package/form-input-number/index.mjs +1 -1
  66. package/form-input-phone-number/index.d.ts +8 -2
  67. package/form-input-phone-number/index.mjs +1 -1
  68. package/form-input-tag/index.d.ts +8 -2
  69. package/form-input-tag/index.mjs +1 -1
  70. package/form-input-time/index.d.ts +16 -10
  71. package/form-input-time/index.mjs +1 -1
  72. package/form-item-group/index.mjs +1 -1
  73. package/form-item-x/index.d.ts +8 -2
  74. package/form-item-x/index.mjs +1 -1
  75. package/form-radio-group/index.d.ts +8 -2
  76. package/form-radio-group/index.mjs +1 -1
  77. package/form-rate/index.d.ts +8 -2
  78. package/form-rate/index.mjs +1 -1
  79. package/form-select/index.d.ts +8 -2
  80. package/form-select/index.mjs +1 -1
  81. package/form-slider/index.d.ts +8 -2
  82. package/form-slider/index.mjs +1 -1
  83. package/form-switch/index.d.ts +8 -2
  84. package/form-switch/index.mjs +1 -1
  85. package/form-table/index.d.ts +43 -25
  86. package/form-table/index.mjs +1 -1
  87. package/form-table-plus/index.d.ts +8 -8
  88. package/form-table-plus/index.mjs +1 -1
  89. package/form-text/index.d.ts +8 -2
  90. package/form-text/index.mjs +1 -1
  91. package/form-textarea/index.d.ts +12 -12
  92. package/form-textarea/index.mjs +1 -1
  93. package/form-time-select/index.d.ts +16 -10
  94. package/form-time-select/index.mjs +1 -1
  95. package/helper/sub-table-plus.d.ts +38 -0
  96. package/helper/sub-table-plus.mjs +4 -0
  97. package/index.css +1 -1
  98. package/index.mjs +33 -33
  99. package/package.json +1 -1
  100. package/pageable-table/index.d.ts +13 -11
  101. package/pageable-table/index.mjs +1 -1
  102. package/pageable-table/style.css +1 -1
  103. package/sub-table/index.d.ts +36 -30
  104. package/sub-table/index.mjs +2 -472
  105. package/sub-table-plus/index.d.ts +15 -3
  106. package/sub-table-plus/index.mjs +1 -1
  107. package/table-column/index.d.ts +8 -5
  108. package/table-column/index.mjs +1 -1
  109. package/table-column-def/index.d.ts +14 -12
  110. package/table-column-def/index.mjs +1 -1
  111. package/table-view/index.d.ts +6 -1
  112. package/table-view/index.mjs +121 -110
  113. package/toolbar/index.mjs +1 -1
  114. package/toolbar-button/index.d.ts +2 -2
  115. package/toolbar-button/index.mjs +1 -1
  116. package/vue-cron/index.mjs +1 -1
  117. package/web-types.json +1 -1
  118. package/x-input-tag/index.mjs +1 -1
  119. package/chunks/B-zqRAXo.mjs +0 -69
  120. package/chunks/BsZgAJX_2.mjs +0 -81
  121. package/chunks/cqIZWDHo.mjs +0 -614
  122. package/chunks/gCeDFHo1.mjs +0 -32
  123. package/chunks/hlha6Bhc.mjs +0 -107
  124. package/chunks/zwXzk9ff2.mjs +0 -568
@@ -0,0 +1,512 @@
1
+ import e from "../confirmable/index.mjs";
2
+ import t from "../confirm-button/index.mjs";
3
+ import { s as n } from "./DcTVYqeJ.mjs";
4
+ import { t as r } from "./DOZRzqlo.mjs";
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 "./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
+ 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";
23
+ //#region src/components/table/sub-table-plus.ts
24
+ var B = {
25
+ modelValue: Array,
26
+ prop: String,
27
+ columns: Array,
28
+ descs: Array,
29
+ ascs: Array,
30
+ limit: {
31
+ type: Number,
32
+ default: Infinity
33
+ },
34
+ disabled: Boolean,
35
+ showSummary: Boolean,
36
+ selection: Boolean,
37
+ index: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ selectionWidth: String,
42
+ toolbarMenus: Array,
43
+ handleMenus: Array,
44
+ fetchApi: Function,
45
+ delApi: Function,
46
+ bottomAddButton: Boolean,
47
+ initRow: Function,
48
+ onRowDbClick: Function,
49
+ showMessage: Boolean,
50
+ pageSize: Number
51
+ }, V = {
52
+ name: "SubTablePlus",
53
+ inject: {
54
+ elForm: {
55
+ from: L,
56
+ default: ""
57
+ },
58
+ elFormItem: {
59
+ from: R,
60
+ default: ""
61
+ }
62
+ },
63
+ provide() {
64
+ return { [i]: this.rowDbClick };
65
+ },
66
+ props: { ...B },
67
+ emits: {
68
+ ...s,
69
+ "add-row": null
70
+ },
71
+ data() {
72
+ return {
73
+ rows: [],
74
+ selectedRows: []
75
+ };
76
+ },
77
+ computed: {
78
+ enabled() {
79
+ return !this.disabled;
80
+ },
81
+ hasToolBarMenu() {
82
+ var e;
83
+ return (e = this.toolbarMenus) == null ? void 0 : e.length;
84
+ },
85
+ hasHandleMenus() {
86
+ var e;
87
+ return (e = this.handleMenus) == null ? void 0 : e.length;
88
+ },
89
+ rowProps() {
90
+ let e = {};
91
+ return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
92
+ e[t] = null;
93
+ }), e;
94
+ },
95
+ listeners() {
96
+ return n(this.$attrs);
97
+ },
98
+ filteredColumns() {
99
+ return this.columns.filter((e) => e.label && !e.hide && !e.slot);
100
+ }
101
+ },
102
+ watch: {
103
+ modelValue: {
104
+ deep: !0,
105
+ immediate: !0,
106
+ handler(e) {
107
+ this.rows = e || [];
108
+ }
109
+ },
110
+ rows: {
111
+ deep: !0,
112
+ immediate: !0,
113
+ handler(e) {
114
+ this.$emit("update:modelValue", e);
115
+ }
116
+ }
117
+ },
118
+ methods: {
119
+ getCellType(e, t) {
120
+ return v(t.getType) ? t.getType(e, t) : t.type;
121
+ },
122
+ getInputAttr(e, t, n) {
123
+ var r;
124
+ let i = {};
125
+ return t.attrs && t.getAttrs ? i = {
126
+ ...t.attrs,
127
+ ...t.getAttrs(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;
129
+ },
130
+ onInput(e, t, n) {
131
+ n.setValue ? n.setValue(e, t, n, this.rows) : n.setVal !== !1 && (e[n.prop] = t);
132
+ },
133
+ onBlur(e, t) {
134
+ t.onBlur && t.onBlur(e, t, this.rows);
135
+ },
136
+ onSelectionChange(e) {
137
+ this.selectedRows = e;
138
+ },
139
+ async remove(e, t) {
140
+ try {
141
+ if (this.delApi) try {
142
+ await this.delApi([e.id]), this.$message.success("删除成功!"), this.refresh();
143
+ } catch {
144
+ this.$message.error("删除失败!");
145
+ }
146
+ else this.rows.splice(t, 1);
147
+ } catch {}
148
+ },
149
+ async add(e, t) {
150
+ if (this.fetchApi) this.addRow();
151
+ else {
152
+ var n;
153
+ let e = z(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
154
+ t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
155
+ }
156
+ },
157
+ addRow() {
158
+ this.$emit("add-row");
159
+ },
160
+ async delRow() {
161
+ if (!this.selectedRows.length) {
162
+ this.$message.warning("请选择要删除的记录!");
163
+ return;
164
+ }
165
+ try {
166
+ if (this.delApi) try {
167
+ await this.delApi(this.selectedRows.map((e) => e.id)), this.$message.success("删除成功!"), this.refresh();
168
+ } catch {
169
+ this.$message.error("删除失败!");
170
+ }
171
+ else this.$emit("update:modelValue", this.rows.filter((e) => !this.selectedRows.includes(e)));
172
+ } catch {}
173
+ },
174
+ refresh() {
175
+ this.$refs.table.getPage();
176
+ },
177
+ getVal(e, t, n) {
178
+ var r, i;
179
+ if (v(n.getVal)) return n.getVal(e, t, n);
180
+ if (n.type === "select" && (r = n.attrs) != null && r.options) {
181
+ let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
182
+ if (r) return r.label || r.name;
183
+ }
184
+ if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
185
+ if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
186
+ let [r] = _(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
187
+ if (r) return r[n.attrs.valueKey || "label"];
188
+ }
189
+ return e[t.property];
190
+ },
191
+ reloadTable() {
192
+ var e;
193
+ (e = this.$refs.table) == null || e.reload();
194
+ },
195
+ async refreshTable() {
196
+ var e;
197
+ await ((e = this.$refs.table) == null ? void 0 : e.getPage());
198
+ },
199
+ removeSelectedRows() {
200
+ this.$emit("update:modelValue", this.modelValue.filter((e) => !this.selectedRows.includes(e)));
201
+ },
202
+ rowDbClick(...e) {
203
+ var t;
204
+ (t = this.onRowDbClick) == null || t.call(this, ...e);
205
+ }
206
+ }
207
+ }, H = { class: "table-header flex-row" }, U = { class: "flex-item" }, W = { class: "flex-not-shrink" }, G = {
208
+ key: 0,
209
+ style: { color: "#f56c6c" }
210
+ }, K = ["title"], q = ["onClick"], J = {
211
+ key: 0,
212
+ class: "flex-row vertical-center horizon-center",
213
+ style: {
214
+ padding: "10px",
215
+ border: "1px solid #ebeef5",
216
+ "border-top": "none"
217
+ }
218
+ };
219
+ function Y(n, i, o, s, _, v) {
220
+ var L, R;
221
+ 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;
222
+ return k(), S("div", { class: O(["sub-table-plus", { "hide-message": !n.showMessage }]) }, [
223
+ E(ce, D(n.$attrs, {
224
+ ref: "table",
225
+ "auto-height": "",
226
+ data: n.fetchApi ? null : _.rows,
227
+ api: n.fetchApi,
228
+ "payload-style": "body",
229
+ "show-summary": n.showSummary,
230
+ descs: n.descs,
231
+ ascs: n.ascs,
232
+ "page-size": n.pageSize,
233
+ "selection-width": n.selectionWidth,
234
+ "hide-on-single-page": "",
235
+ selection: n.selection,
236
+ index: n.index,
237
+ "row-db-click": v.rowDbClick,
238
+ onRowDblclick: v.rowDbClick
239
+ }, P(v.listeners), { onSelectionChange: v.onSelectionChange }), w({
240
+ default: F(() => [
241
+ j(n.$slots, "columns", { columns: n.columns }, () => [(k(!0), S(y, null, A(v.filteredColumns, (e) => (k(), b($, {
242
+ key: e.prop,
243
+ label: e.label,
244
+ width: e.width,
245
+ "dict-type": e.dictType,
246
+ clickable: e.clickable,
247
+ align: e.align,
248
+ prop: e.prop,
249
+ options: e.options,
250
+ "show-overflow-tooltip": !e.editable && e.showOverflowTooltip
251
+ }, {
252
+ header: F(() => [!n.disabled && e.required ? (k(), S("span", G, "*")) : x("v-if", !0), C("span", { title: e.label }, N(e.label), 9, K)]),
253
+ default: F(({ row: t, column: r, $index: i }) => [
254
+ x("tag 插槽"),
255
+ j(n.$slots, "tag", {
256
+ row: t,
257
+ column: r,
258
+ index: i
259
+ }),
260
+ x("列默认插槽,名字和 prop 保持一致"),
261
+ j(n.$slots, e.prop, {
262
+ row: t,
263
+ column: r,
264
+ wrapCol: !1,
265
+ index: i,
266
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
267
+ required: e.required,
268
+ editable: e.editable
269
+ }, () => {
270
+ var n;
271
+ return [v.enabled && e.editable === !0 ? (k(), S(y, { key: 0 }, [v.getCellType(t, e) === "input" ? (k(), b(V, D({
272
+ key: 0,
273
+ ref_for: !0
274
+ }, v.getInputAttr(t, e, i), {
275
+ onBlur: () => v.onBlur(t, e),
276
+ onInput: (n) => v.onInput(t, n, e)
277
+ }), null, 16, ["onBlur", "onInput"])) : v.getCellType(t, e) === "checkbox1" ? (k(), b(Y, D({
278
+ key: 1,
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({
281
+ key: 2,
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({
284
+ key: 0,
285
+ ref_for: !0
286
+ }, v.getInputAttr(t, e, i), {
287
+ id: t[r.idProp || `${r.property}Id`],
288
+ "onUpdate:id": (e) => t[r.idProp || `${r.property}Id`] = e,
289
+ name: t[r.property],
290
+ "onUpdate:name": (e) => t[r.property] = e,
291
+ onInput: (n) => v.onInput(t, n, e)
292
+ }), null, 16, [
293
+ "id",
294
+ "onUpdate:id",
295
+ "name",
296
+ "onUpdate:name",
297
+ "onInput"
298
+ ])) : (k(), b(Z, D({
299
+ key: 1,
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({
302
+ key: 0,
303
+ ref_for: !0
304
+ }, v.getInputAttr(t, e, i), {
305
+ name: t[r.property],
306
+ "onUpdate:name": (e) => t[r.property] = e,
307
+ onInput: (n) => v.onInput(t, n, e)
308
+ }), null, 16, [
309
+ "name",
310
+ "onUpdate:name",
311
+ "onInput"
312
+ ])) : (k(), b(Q, D({
313
+ key: 1,
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({
316
+ key: 5,
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({
319
+ key: 6,
320
+ ref_for: !0
321
+ }, v.getInputAttr(t, e, i), {
322
+ start: t[e.start],
323
+ "onUpdate:start": (n) => t[e.start] = n,
324
+ end: t[e.end],
325
+ "onUpdate:end": (n) => t[e.end] = n,
326
+ onInput: (n) => v.onInput(t, n, e)
327
+ }), null, 16, [
328
+ "start",
329
+ "onUpdate:start",
330
+ "end",
331
+ "onUpdate:end",
332
+ "onInput"
333
+ ])) : v.getCellType(t, e) === "cascader" ? (k(), b(re, D({
334
+ key: 7,
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({
337
+ key: 8,
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({
340
+ key: 9,
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, {
343
+ key: 1,
344
+ "dict-type": e.dictType,
345
+ "id-as-value": e.idAsValue,
346
+ "label-as-value": e.labelAsValue,
347
+ column: r,
348
+ row: t,
349
+ options: e.options
350
+ }, null, 8, [
351
+ "dict-type",
352
+ "id-as-value",
353
+ "label-as-value",
354
+ "column",
355
+ "row",
356
+ "options"
357
+ ])) : (k(), S(y, { key: 2 }, [T(N(v.getVal(t, r, e)), 1)], 64))];
358
+ })
359
+ ]),
360
+ _: 2
361
+ }, 1032, [
362
+ "label",
363
+ "width",
364
+ "dict-type",
365
+ "clickable",
366
+ "align",
367
+ "prop",
368
+ "options",
369
+ "show-overflow-tooltip"
370
+ ]))), 128))]),
371
+ j(n.$slots, "handle", {
372
+ add: v.add,
373
+ remove: v.remove
374
+ }),
375
+ !n.disabled && v.hasHandleMenus ? (k(), b($, {
376
+ key: 0,
377
+ label: "操作",
378
+ width: "80",
379
+ align: "center",
380
+ prop: "menu"
381
+ }, {
382
+ header: F(({ column: e, $index: t }) => [j(n.$slots, "handle-column-header", {
383
+ column: e,
384
+ index: t
385
+ }, () => [T(N(e.label), 1)])]),
386
+ default: F(({ row: e, $index: t }) => {
387
+ var r, i, a;
388
+ return [(r = n.handleMenus) != null && r.includes("add") && ((i = n.modelValue) == null ? void 0 : i.length) < n.limit ? (k(), S("i", {
389
+ key: 0,
390
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
391
+ style: {
392
+ "margin-right": "5px",
393
+ "font-size": "20px",
394
+ cursor: "pointer"
395
+ },
396
+ title: "添加",
397
+ onClick: I((n) => v.add(e, t), ["stop"])
398
+ }, null, 8, q)) : x("v-if", !0), (a = n.handleMenus) != null && a.includes("delete") ? (k(), b(se, {
399
+ key: 1,
400
+ class: "el-icon-error sub-table-handle-button table-button-remove",
401
+ title: "删除",
402
+ message: "您确定要删除该行吗?",
403
+ onClick: I((n) => v.remove(e, t), ["stop"])
404
+ }, null, 8, ["onClick"])) : x("v-if", !0)];
405
+ }),
406
+ _: 3
407
+ })) : x("v-if", !0)
408
+ ]),
409
+ _: 2
410
+ }, [!n.disabled || v.hasToolBarMenu ? {
411
+ name: "toolbar",
412
+ fn: F(() => [C("div", H, [j(n.$slots, "toolbar", {
413
+ addRow: v.addRow,
414
+ delRow: v.delRow,
415
+ refresh: v.refresh
416
+ }, () => [C("div", U, [j(n.$slots, "toolbar-left", {
417
+ addRow: v.addRow,
418
+ delRow: v.delRow,
419
+ refresh: v.refresh
420
+ }, () => {
421
+ var e, t, r;
422
+ return [
423
+ (e = n.toolbarMenus) != null && e.includes("add") ? (k(), b(z, {
424
+ key: 0,
425
+ class: "table-header-button add",
426
+ icon: "el-icon-circle-plus",
427
+ type: "text",
428
+ onClick: v.addRow
429
+ }, {
430
+ default: F(() => [...i[2] || (i[2] = [T(" 添加 ", -1)])]),
431
+ _: 1
432
+ }, 8, ["onClick"])) : x("v-if", !0),
433
+ (t = n.toolbarMenus) != null && t.includes("delete") ? (k(), b(B, {
434
+ key: 1,
435
+ disabled: _.selectedRows.length <= 0,
436
+ class: "table-header-button remove",
437
+ message: "您确定要删除选中的记录吗?",
438
+ icon: "el-icon-error",
439
+ type: "text",
440
+ onClick: v.delRow
441
+ }, {
442
+ default: F(() => [...i[3] || (i[3] = [T(" 删除 ", -1)])]),
443
+ _: 1
444
+ }, 8, ["disabled", "onClick"])) : x("v-if", !0),
445
+ (r = n.toolbarMenus) != null && r.includes("refresh") ? (k(), b(z, {
446
+ key: 2,
447
+ class: "table-header-button refresh",
448
+ icon: "el-icon-refresh-left",
449
+ type: "text",
450
+ disabled: !1,
451
+ onClick: v.refresh
452
+ }, {
453
+ default: F(() => [...i[4] || (i[4] = [T(" 刷新 ", -1)])]),
454
+ _: 1
455
+ }, 8, ["onClick"])) : x("v-if", !0)
456
+ ];
457
+ }), j(n.$slots, "toolbar-left-append", {
458
+ addRow: v.addRow,
459
+ delRow: v.delRow,
460
+ refresh: v.refresh
461
+ })]), C("div", W, [j(n.$slots, "toolbar-right", {
462
+ removeSelectedRows: v.removeSelectedRows,
463
+ selectedRows: _.selectedRows
464
+ })])])])]),
465
+ key: "0"
466
+ } : void 0, n.bottomAddButton ? {
467
+ name: "empty",
468
+ fn: F(() => [C("i", {
469
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
470
+ style: {
471
+ "font-size": "20px",
472
+ cursor: "pointer"
473
+ },
474
+ title: "添加",
475
+ onClick: i[0] || (i[0] = I((e) => {
476
+ var t;
477
+ return v.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
478
+ }, ["stop"]))
479
+ })]),
480
+ key: "1"
481
+ } : void 0]), 1040, [
482
+ "data",
483
+ "api",
484
+ "show-summary",
485
+ "descs",
486
+ "ascs",
487
+ "page-size",
488
+ "selection-width",
489
+ "selection",
490
+ "index",
491
+ "row-db-click",
492
+ "onRowDblclick",
493
+ "onSelectionChange"
494
+ ]),
495
+ x("底部添加按钮"),
496
+ !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", {
497
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
498
+ style: {
499
+ "font-size": "20px",
500
+ cursor: "pointer"
501
+ },
502
+ title: "添加",
503
+ onClick: i[1] || (i[1] = I((e) => {
504
+ var t;
505
+ return v.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
506
+ }, ["stop"]))
507
+ })])) : x("v-if", !0)
508
+ ], 2);
509
+ }
510
+ var X = /* @__PURE__ */ o(V, [["render", Y]]);
511
+ //#endregion
512
+ export { B as n, X as t };