@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta50

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 (208) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -1
  6. package/chunks/6yfBZFOB.mjs +56 -0
  7. package/chunks/B-zqRAXo.mjs +69 -0
  8. package/chunks/B1IPSTA6.mjs +198 -0
  9. package/chunks/B9gA65rt2.mjs +38 -0
  10. package/chunks/BA2KEptL.mjs +172 -0
  11. package/chunks/BBERmTup.mjs +83 -0
  12. package/chunks/BUGCiCnl.mjs +83 -0
  13. package/chunks/BbSPWDDZ.mjs +100 -0
  14. package/chunks/BfxDxIg0.mjs +106 -0
  15. package/chunks/BqWvBF14.mjs +35 -0
  16. package/chunks/BsZgAJX_2.mjs +81 -0
  17. package/chunks/BtcjAHE6.mjs +317 -0
  18. package/chunks/ByHz4mmh.mjs +87 -0
  19. package/chunks/C2zgFLYO.mjs +185 -0
  20. package/chunks/CAd1zK9Q.mjs +25 -0
  21. package/chunks/CJdkjadi.mjs +17 -0
  22. package/chunks/CabldOLo.mjs +157 -0
  23. package/chunks/CkOD-_VV.mjs +8 -0
  24. package/chunks/Cln3RBAD.mjs +660 -0
  25. package/chunks/CqoVAnxC2.mjs +93 -0
  26. package/chunks/CuAoMR3n.mjs +105 -0
  27. package/chunks/CxTg0r4n.mjs +166 -0
  28. package/chunks/D0Zg2CV0.mjs +57 -0
  29. package/chunks/DA7oGHSX.mjs +141 -0
  30. package/chunks/DOP3aBxf.mjs +93 -0
  31. package/chunks/DOZRzqlo.mjs +37 -0
  32. package/chunks/D_qiRmiE.mjs +230 -0
  33. package/chunks/DcTVYqeJ.mjs +113 -0
  34. package/chunks/Dkd5BC98.mjs +198 -0
  35. package/chunks/GI8krYU82.mjs +478 -0
  36. package/chunks/V2p-PCpL.mjs +176 -0
  37. package/chunks/bFbPPcdq.mjs +25 -0
  38. package/chunks/cqIZWDHo.mjs +614 -0
  39. package/chunks/eae6huQB.mjs +25 -0
  40. package/chunks/gCeDFHo1.mjs +32 -0
  41. package/chunks/gLPy4Sus.mjs +164 -0
  42. package/chunks/hlha6Bhc.mjs +107 -0
  43. package/chunks/hzaYr6Ud2.mjs +207 -0
  44. package/chunks/kflKDW4T2.mjs +146 -0
  45. package/chunks/pIzhYsBe.mjs +93 -0
  46. package/chunks/vXQf89tS.mjs +1361 -0
  47. package/chunks/wXeqV-_7.mjs +89 -0
  48. package/chunks/zwXzk9ff2.mjs +568 -0
  49. package/confirm-button/index.d.ts +115 -0
  50. package/confirm-button/index.mjs +35 -0
  51. package/confirmable/index.d.ts +86 -0
  52. package/confirmable/index.mjs +8 -0
  53. package/constants/index.d.ts +53 -0
  54. package/constants/index.mjs +4 -0
  55. package/dict-render/index.d.ts +28 -0
  56. package/dict-render/index.mjs +2 -0
  57. package/editable-tree/index.d.ts +254 -0
  58. package/editable-tree/index.mjs +2 -0
  59. package/editable-tree/style.css +1 -0
  60. package/element-dialog/index.d.ts +337 -16
  61. package/element-dialog/index.mjs +2 -91
  62. package/element-resize-observer/index.d.ts +8 -0
  63. package/element-resize-observer/index.mjs +40 -0
  64. package/element-resize-observer/style.css +1 -0
  65. package/empty-view/index.d.ts +2 -2
  66. package/empty-view/index.mjs +1 -1
  67. package/flex-scroll-area/index.d.ts +1 -1
  68. package/flex-scroll-area/index.mjs +1 -1
  69. package/form-advice/index.mjs +13 -12
  70. package/form-button/index.d.ts +116 -0
  71. package/form-button/index.mjs +36 -0
  72. package/form-card/index.d.ts +14 -0
  73. package/form-card/index.mjs +18 -0
  74. package/form-cascader/index.d.ts +472 -0
  75. package/form-cascader/index.mjs +2 -0
  76. package/form-checkbox/index.d.ts +236 -16
  77. package/form-checkbox/index.mjs +1 -1
  78. package/form-checkbox-group/index.d.ts +364 -0
  79. package/form-checkbox-group/index.mjs +2 -0
  80. package/form-checkbox-group/style.css +1 -0
  81. package/form-date-picker/index.d.ts +390 -19
  82. package/form-date-picker/index.mjs +1 -1
  83. package/form-holder/index.d.ts +87 -20
  84. package/form-holder/index.mjs +1 -1
  85. package/form-holder/style.css +1 -1
  86. package/form-image/index.d.ts +145 -13
  87. package/form-image/index.mjs +1 -1
  88. package/form-input/index.d.ts +301 -20
  89. package/form-input/index.mjs +1 -1
  90. package/form-input/style.css +1 -0
  91. package/form-input-cron-expression/index.d.ts +217 -0
  92. package/form-input-cron-expression/index.mjs +2 -0
  93. package/form-input-cron-expression/style.css +1 -0
  94. package/form-input-email/index.d.ts +307 -16
  95. package/form-input-email/index.mjs +1 -1
  96. package/form-input-id-card/index.d.ts +307 -16
  97. package/form-input-id-card/index.mjs +1 -1
  98. package/form-input-number/index.d.ts +246 -18
  99. package/form-input-number/index.mjs +1 -1
  100. package/form-input-phone-number/index.d.ts +307 -16
  101. package/form-input-phone-number/index.mjs +1 -1
  102. package/form-input-tag/index.d.ts +263 -1
  103. package/form-input-tag/index.mjs +1 -3
  104. package/form-input-time/index.d.ts +434 -1
  105. package/form-input-time/index.mjs +1 -3
  106. package/form-item-config-provider/index.d.ts +22 -0
  107. package/form-item-config-provider/index.mjs +24 -0
  108. package/form-item-group/index.d.ts +91 -17
  109. package/form-item-group/index.mjs +2 -78
  110. package/form-item-group/style.css +1 -1
  111. package/form-item-x/index.d.ts +141 -11
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-item-x/style.css +1 -0
  114. package/form-radio-group/index.d.ts +303 -16
  115. package/form-radio-group/index.mjs +1 -1
  116. package/form-rate/index.d.ts +254 -14
  117. package/form-rate/index.mjs +1 -1
  118. package/form-red-table/index.mjs +27 -26
  119. package/form-row/index.d.ts +2 -2
  120. package/form-row/index.mjs +1 -1
  121. package/form-select/index.d.ts +537 -18
  122. package/form-select/index.mjs +1 -1
  123. package/form-slider/index.d.ts +283 -16
  124. package/form-slider/index.mjs +1 -1
  125. package/form-switch/index.d.ts +272 -14
  126. package/form-switch/index.mjs +1 -1
  127. package/form-table/index.d.ts +269 -0
  128. package/form-table/index.mjs +2 -0
  129. package/form-table-plus/index.d.ts +266 -0
  130. package/form-table-plus/index.mjs +2 -0
  131. package/form-text/index.d.ts +165 -13
  132. package/form-text/index.mjs +1 -1
  133. package/form-textarea/index.d.ts +351 -0
  134. package/form-textarea/index.mjs +2 -0
  135. package/form-time-select/index.d.ts +319 -0
  136. package/form-time-select/index.mjs +2 -0
  137. package/form-view/index.mjs +1 -1
  138. package/helper/dictionary.d.ts +15 -0
  139. package/helper/dictionary.mjs +97 -0
  140. package/hook/useDictionary.d.ts +60 -0
  141. package/hook/useDictionary.mjs +15 -0
  142. package/hook/useVisibilityChange.d.ts +4 -0
  143. package/hook/useVisibilityChange.mjs +14 -0
  144. package/iframe-window/index.d.ts +9 -0
  145. package/iframe-window/index.mjs +37 -0
  146. package/iframe-window/style.css +1 -0
  147. package/index.css +2 -0
  148. package/index.d.ts +57 -36
  149. package/index.mjs +59 -61
  150. package/package.json +10 -5
  151. package/pageable-table/index.d.ts +398 -0
  152. package/pageable-table/index.mjs +2 -0
  153. package/pageable-table/style.css +1 -0
  154. package/resolver/index.mjs +29 -0
  155. package/sub-table/index.d.ts +100 -0
  156. package/sub-table/index.mjs +472 -0
  157. package/sub-table/style.css +1 -0
  158. package/sub-table-plus/index.d.ts +97 -0
  159. package/sub-table-plus/index.mjs +2 -0
  160. package/sub-table-plus/style.css +1 -0
  161. package/table-column/index.d.ts +160 -0
  162. package/table-column/index.mjs +2 -0
  163. package/table-column/style.css +1 -0
  164. package/table-column-def/index.d.ts +95 -0
  165. package/table-column-def/index.mjs +11 -0
  166. package/table-view/index.d.ts +340 -1
  167. package/table-view/index.mjs +454 -6
  168. package/table-view/style.css +1 -0
  169. package/toolbar/index.d.ts +128 -1
  170. package/toolbar/index.mjs +1 -8
  171. package/toolbar/style.css +1 -0
  172. package/toolbar-button/index.d.ts +188 -1
  173. package/toolbar-button/index.mjs +1 -8
  174. package/vue-cron/index.d.ts +191 -0
  175. package/vue-cron/index.mjs +2 -0
  176. package/vue-cron/style.css +1 -0
  177. package/web-types.json +1 -1
  178. package/x-input-tag/index.d.ts +2 -0
  179. package/x-input-tag/index.mjs +228 -0
  180. package/x-input-tag/style.css +1 -0
  181. package/year-calendar/index.d.ts +99 -0
  182. package/year-calendar/index.mjs +2 -0
  183. package/year-calendar/style.css +1 -0
  184. package/chunks/B4M_TFeR.mjs +0 -152
  185. package/chunks/B5BIQCcK.mjs +0 -149
  186. package/chunks/BHNKrW1j.mjs +0 -61
  187. package/chunks/BO9jWhBl.mjs +0 -46
  188. package/chunks/BZ8aOa78.mjs +0 -35
  189. package/chunks/Bsz7y4Xp.mjs +0 -73
  190. package/chunks/Bxj372sF.mjs +0 -53
  191. package/chunks/C33EmJN8.mjs +0 -32
  192. package/chunks/C6Li3-l7.mjs +0 -28
  193. package/chunks/CBcdalMX.mjs +0 -35
  194. package/chunks/CdRsyF0n.mjs +0 -43
  195. package/chunks/ClNahmiU.mjs +0 -23
  196. package/chunks/CstztYMu.mjs +0 -28
  197. package/chunks/DC9b53M6.mjs +0 -32
  198. package/chunks/DDVAgRED.mjs +0 -36
  199. package/chunks/DpJQABVD.mjs +0 -91
  200. package/chunks/ZsLNWI9x.mjs +0 -46
  201. package/chunks/jn_iQrVZ.mjs +0 -28
  202. package/constants.d.ts +0 -1
  203. package/constants.mjs +0 -4
  204. package/form-check-box-group/index.d.ts +0 -93
  205. package/form-check-box-group/index.mjs +0 -2
  206. package/input/style.css +0 -1
  207. package/resolver.mjs +0 -79
  208. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,89 @@
1
+ import { i as e, n as t } from "./D_qiRmiE.mjs";
2
+ import { n } from "./CJdkjadi.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElCheckbox as o } from "element-plus/es";
5
+ //#region src/components/form/props/checkbox.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ String,
10
+ Number,
11
+ Boolean
12
+ ],
13
+ value: [
14
+ String,
15
+ Number,
16
+ Boolean,
17
+ Object
18
+ ],
19
+ labelValue: [
20
+ String,
21
+ Number,
22
+ Boolean,
23
+ Object
24
+ ],
25
+ trueValue: {
26
+ type: [String, Number],
27
+ default: "1"
28
+ },
29
+ falseValue: {
30
+ type: [String, Number],
31
+ default: "0"
32
+ },
33
+ border: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ size: String,
38
+ name: String,
39
+ checked: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ indeterminate: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ validateEvent: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ tabindex: [String, Number],
52
+ id: String,
53
+ ariaControls: String,
54
+ ariaLabel: String,
55
+ trueLabel: {
56
+ type: [String, Number],
57
+ default: "1"
58
+ },
59
+ falseLabel: {
60
+ type: [String, Number],
61
+ default: "0"
62
+ },
63
+ controls: String
64
+ }, c = {
65
+ modelValue: !0,
66
+ disabled: !0,
67
+ labelValue: !0
68
+ }, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
69
+ name: "FormCheckbox",
70
+ inheritAttrs: !1,
71
+ props: { ...s },
72
+ emits: { ...t },
73
+ setup(t, { emit: n, slots: s, attrs: c }) {
74
+ let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
75
+ emit: n,
76
+ slots: s,
77
+ attrs: c,
78
+ predicate: l
79
+ });
80
+ return () => d({ vNodes: r(o, i(m.value, p.value, {
81
+ label: t.labelValue,
82
+ modelValue: u.value,
83
+ "onUpdate:modelValue": (e) => u.value = e,
84
+ disabled: f.value
85
+ }), { default: s.default }) });
86
+ }
87
+ };
88
+ //#endregion
89
+ export { u as t };
@@ -0,0 +1,568 @@
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 { t as i } from "./CxTg0r4n.mjs";
6
+ import { t as a } from "./CkOD-_VV.mjs";
7
+ import { n as o } from "./D_qiRmiE.mjs";
8
+ import { t as s } from "./Dkd5BC98.mjs";
9
+ import { t as c } from "./wXeqV-_7.mjs";
10
+ import { t as l } from "./CabldOLo.mjs";
11
+ import { t as u } from "./V2p-PCpL.mjs";
12
+ import { t as d } from "./B1IPSTA6.mjs";
13
+ import { t as f } from "./BbSPWDDZ.mjs";
14
+ import { t as p } from "./bFbPPcdq.mjs";
15
+ import { t as ee } from "./BtcjAHE6.mjs";
16
+ import { t as m } from "./cqIZWDHo.mjs";
17
+ import h from "../table-column-def/index.mjs";
18
+ import { findTreeChildren as g, isFunction as _ } from "@web-utils/core";
19
+ import { Fragment as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, mergeProps as E, normalizeClass as D, openBlock as O, renderList as k, renderSlot as A, toDisplayString as j, toHandlers as M, withCtx as N, withModifiers as P } from "vue";
20
+ import { formContextKey as F, formItemContextKey as I } from "element-plus";
21
+ import { cloneDeep as L } from "@web-utils/integrations/lodash";
22
+ //#region src/components/table/sub-table-plus.ts
23
+ var R = {
24
+ modelValue: Array,
25
+ prop: String,
26
+ columns: Array,
27
+ descs: Array,
28
+ ascs: Array,
29
+ limit: {
30
+ type: Number,
31
+ default: Infinity
32
+ },
33
+ disabled: Boolean,
34
+ showSummary: Boolean,
35
+ selection: Boolean,
36
+ index: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ selectionWidth: String,
41
+ toolbarMenus: Array,
42
+ handleMenus: Array,
43
+ fetchApi: Function,
44
+ delApi: Function,
45
+ bottomAddButton: Boolean,
46
+ initRow: Function,
47
+ onRowDbClick: Function,
48
+ showMessage: Boolean,
49
+ pageSize: Number
50
+ }, z = {
51
+ name: "SubTablePlus",
52
+ inject: {
53
+ elForm: {
54
+ from: F,
55
+ default: ""
56
+ },
57
+ elFormItem: {
58
+ from: I,
59
+ default: ""
60
+ }
61
+ },
62
+ props: { ...R },
63
+ emits: {
64
+ ...o,
65
+ "add-row": null
66
+ },
67
+ data() {
68
+ return {
69
+ rows: [],
70
+ selectedRows: []
71
+ };
72
+ },
73
+ computed: {
74
+ enabled() {
75
+ return !this.disabled;
76
+ },
77
+ hasToolBarMenu() {
78
+ var e;
79
+ return (e = this.toolbarMenus) == null ? void 0 : e.length;
80
+ },
81
+ hasHandleMenus() {
82
+ var e;
83
+ return (e = this.handleMenus) == null ? void 0 : e.length;
84
+ },
85
+ rowProps() {
86
+ let e = {};
87
+ return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
88
+ e[t] = null;
89
+ }), e;
90
+ },
91
+ listeners() {
92
+ return n(this.$attrs);
93
+ },
94
+ filteredColumns() {
95
+ return this.columns.filter((e) => e.label && !e.hide && !e.slot);
96
+ }
97
+ },
98
+ watch: {
99
+ modelValue: {
100
+ deep: !0,
101
+ immediate: !0,
102
+ handler(e) {
103
+ this.rows = e || [];
104
+ }
105
+ },
106
+ rows: {
107
+ deep: !0,
108
+ immediate: !0,
109
+ handler(e) {
110
+ this.$emit("update:modelValue", e);
111
+ }
112
+ }
113
+ },
114
+ methods: {
115
+ getCellType(e, t) {
116
+ return _(t.getType) ? t.getType(e, t) : t.type;
117
+ },
118
+ getInputAttr(e, t) {
119
+ return t.attrs && t.getAttrs ? {
120
+ ...t.attrs,
121
+ ...t.getAttrs(e)
122
+ } : t.attrs ? t.attrs : t.getAttrs ? t.getAttrs(e) : {};
123
+ },
124
+ isInputDisabled(e, t) {
125
+ var n;
126
+ return (n = t.isDisabled) == null ? void 0 : n.call(t, e);
127
+ },
128
+ onInput(e, t, n) {
129
+ n.setValue ? n.setValue(e, t, n, this.rows) : n.setVal !== !1 && (e[n.prop] = t);
130
+ },
131
+ onBlur(e, t) {
132
+ t.onBlur && t.onBlur(e, t, this.rows);
133
+ },
134
+ onSelectionChange(e) {
135
+ this.selectedRows = e;
136
+ },
137
+ async remove(e, t) {
138
+ try {
139
+ if (this.delApi) try {
140
+ await this.delApi([e.id]), this.$message.success("删除成功!"), this.refresh();
141
+ } catch {
142
+ this.$message.error("删除失败!");
143
+ }
144
+ else this.rows.splice(t, 1);
145
+ } catch {}
146
+ },
147
+ async add(e, t) {
148
+ if (this.fetchApi) this.addRow();
149
+ else {
150
+ var n;
151
+ let e = L(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
152
+ t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
153
+ }
154
+ },
155
+ addRow() {
156
+ this.$emit("add-row");
157
+ },
158
+ async delRow() {
159
+ if (!this.selectedRows.length) {
160
+ this.$message.warning("请选择要删除的记录!");
161
+ return;
162
+ }
163
+ try {
164
+ if (this.delApi) try {
165
+ await this.delApi(this.selectedRows.map((e) => e.id)), this.$message.success("删除成功!"), this.refresh();
166
+ } catch {
167
+ this.$message.error("删除失败!");
168
+ }
169
+ else this.$emit("update:modelValue", this.rows.filter((e) => !this.selectedRows.includes(e)));
170
+ } catch {}
171
+ },
172
+ refresh() {
173
+ this.$refs.table.getPage();
174
+ },
175
+ getVal(e, t, n) {
176
+ var r, i;
177
+ if (n.type === "select" && (r = n.attrs) != null && r.options) {
178
+ let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
179
+ if (r) return r.label || r.name;
180
+ }
181
+ if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
182
+ if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
183
+ let [r] = g(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
184
+ if (r) return r[n.attrs.valueKey || "label"];
185
+ }
186
+ return e[t.property];
187
+ },
188
+ reloadTable() {
189
+ var e;
190
+ (e = this.$refs.table) == null || e.reload();
191
+ },
192
+ async refreshTable() {
193
+ var e;
194
+ await ((e = this.$refs.table) == null ? void 0 : e.getPage());
195
+ },
196
+ removeSelectedRows() {
197
+ this.$emit("update:modelValue", this.modelValue.filter((e) => !this.selectedRows.includes(e)));
198
+ },
199
+ rowDbClick(...e) {
200
+ var t;
201
+ (t = this.onRowDbClick) == null || t.call(this, ...e);
202
+ }
203
+ }
204
+ }, B = { class: "table-header flex-row" }, V = { class: "flex-item" }, H = { class: "flex-not-shrink" }, U = {
205
+ key: 0,
206
+ style: { color: "#f56c6c" }
207
+ }, W = ["title"], G = ["onClick"], K = {
208
+ key: 0,
209
+ class: "flex-row vertical-center horizon-center",
210
+ style: {
211
+ padding: "10px",
212
+ border: "1px solid #ebeef5",
213
+ "border-top": "none"
214
+ }
215
+ };
216
+ function q(n, a, o, g, _, F) {
217
+ var I, L;
218
+ let R = i, z = t, q = l, J = c, Y = p, X = ee, Z = d, Q = s, te = u, ne = f, re = r, $ = h, ie = e, ae = m;
219
+ return O(), x("div", { class: D(["sub-table-plus", { "hide-message": !n.showMessage }]) }, [
220
+ T(ae, E(n.$attrs, {
221
+ ref: "table",
222
+ "auto-height": "",
223
+ data: n.fetchApi ? null : _.rows,
224
+ api: n.fetchApi,
225
+ "payload-style": "body",
226
+ "show-summary": n.showSummary,
227
+ descs: n.descs,
228
+ ascs: n.ascs,
229
+ "page-size": n.pageSize,
230
+ "selection-width": n.selectionWidth,
231
+ "hide-on-single-page": "",
232
+ selection: n.selection,
233
+ index: n.index
234
+ }, M(F.listeners), { onSelectionChange: F.onSelectionChange }), C({
235
+ default: N(() => [
236
+ A(n.$slots, "columns", { columns: n.columns }, () => [(O(!0), x(v, null, k(F.filteredColumns, (e) => (O(), y($, {
237
+ key: `${e.prop}-${F.enabled}${e.type ? `-${e.type}` : ""}${e.required ? `-${e.required}` : ""}`,
238
+ label: e.label,
239
+ width: e.width,
240
+ "dict-type": e.dictType,
241
+ clickable: e.clickable,
242
+ align: e.align,
243
+ prop: e.prop,
244
+ options: e.options,
245
+ "show-overflow-tooltip": !e.editable && e.showOverflowTooltip
246
+ }, {
247
+ header: N(() => [!n.disabled && e.required ? (O(), x("span", U, "*")) : b("v-if", !0), S("span", { title: e.label }, j(e.label), 9, W)]),
248
+ default: N(({ row: t, column: r, $index: i }) => [
249
+ b("tag 插槽"),
250
+ A(n.$slots, "tag", {
251
+ row: t,
252
+ column: r,
253
+ index: i
254
+ }),
255
+ b("列默认插槽,名字和 prop 保持一致"),
256
+ A(n.$slots, e.prop, {
257
+ row: t,
258
+ column: r,
259
+ wrapCol: !1,
260
+ index: i,
261
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
262
+ required: e.required,
263
+ editable: e.editable
264
+ }, () => {
265
+ var a;
266
+ return [F.enabled && e.editable === !0 ? (O(), x(v, { key: 0 }, [F.getCellType(t, e) === "input" ? (O(), y(q, E({
267
+ key: 0,
268
+ "wrap-col": !1,
269
+ "model-value": t[r.property]
270
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
271
+ disabled: F.isInputDisabled(t, e),
272
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
273
+ required: e.required,
274
+ onBlur: () => F.onBlur(t, e),
275
+ onInput: (n) => F.onInput(t, n, e)
276
+ }), null, 16, [
277
+ "model-value",
278
+ "disabled",
279
+ "prop",
280
+ "required",
281
+ "onBlur",
282
+ "onInput"
283
+ ])) : F.getCellType(t, e) === "checkbox1" ? (O(), y(J, E({
284
+ key: 1,
285
+ "wrap-col": !1,
286
+ "model-value": t[r.property]
287
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
288
+ disabled: F.isInputDisabled(t, e),
289
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
290
+ required: e.required,
291
+ onInput: (n) => F.onInput(t, n, e)
292
+ }), null, 16, [
293
+ "model-value",
294
+ "disabled",
295
+ "prop",
296
+ "required",
297
+ "onInput"
298
+ ])) : F.getCellType(t, e) === "inputPhoneNumber" ? (O(), y(Y, E({
299
+ key: 2,
300
+ "wrap-col": !1,
301
+ "model-value": t[r.property]
302
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
303
+ disabled: F.isInputDisabled(t, e),
304
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
305
+ required: e.required,
306
+ onInput: (n) => F.onInput(t, n, e)
307
+ }), null, 16, [
308
+ "model-value",
309
+ "disabled",
310
+ "prop",
311
+ "required",
312
+ "onInput"
313
+ ])) : F.getCellType(t, e) === "select" ? (O(), x(v, { key: 3 }, [b(" <template v-else-if=\"getCellType(row, item) === 'user'\">\n <FormInputUser\n v-if=\"item.single\"\n v-model:id=\"row[column.idProp || `${column.property}Id`]\"\n v-model:name=\"row[column.property]\"\n :wrap-col=\"false\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n <FormInputUser\n v-else\n :wrap-col=\"false\"\n :model-value=\"row[column.property]\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n </template>\n <template v-else-if=\"getCellType(row, item) === 'department'\">\n <FormInputDepartment\n v-if=\"item.single\"\n v-model:name=\"row[column.property]\"\n :wrap-col=\"false\"\n :ou-type=\"item.ouType\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n <FormInputDepartment\n v-else\n :wrap-col=\"false\"\n :model-value=\"row[column.property]\"\n v-bind=\"getInputAttr(row, item)\"\n :disabled=\"isInputDisabled(row, item)\"\n :prop=\"prop ? `${prop}[${$index}].${item.prop}` : null\"\n :required=\"item.required\"\n @input=\"val => onInput(row, val, item)\" />\n </template>"), T(X, E({
314
+ "wrap-col": !1,
315
+ "model-value": t[r.property]
316
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
317
+ disabled: F.isInputDisabled(t, e),
318
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
319
+ required: e.required,
320
+ onInput: (n) => F.onInput(t, n, e)
321
+ }), null, 16, [
322
+ "model-value",
323
+ "disabled",
324
+ "prop",
325
+ "required",
326
+ "onInput"
327
+ ])], 64)) : F.getCellType(t, e) === "datePicker" ? (O(), y(Z, E({
328
+ key: 4,
329
+ ref_for: !0
330
+ }, F.getInputAttr(t, e), {
331
+ start: t[e.start],
332
+ "onUpdate:start": (n) => t[e.start] = n,
333
+ end: t[e.end],
334
+ "onUpdate:end": (n) => t[e.end] = n,
335
+ "wrap-col": !1,
336
+ "model-value": t[r.property],
337
+ disabled: F.isInputDisabled(t, e),
338
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
339
+ required: e.required,
340
+ onInput: (n) => F.onInput(t, n, e)
341
+ }), null, 16, [
342
+ "start",
343
+ "onUpdate:start",
344
+ "end",
345
+ "onUpdate:end",
346
+ "model-value",
347
+ "disabled",
348
+ "prop",
349
+ "required",
350
+ "onInput"
351
+ ])) : F.getCellType(t, e) === "cascader" ? (O(), y(Q, E({
352
+ key: 5,
353
+ "wrap-col": !1,
354
+ "model-value": t[r.property]
355
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
356
+ disabled: F.isInputDisabled(t, e),
357
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
358
+ required: e.required,
359
+ "label-key": e.labelKey,
360
+ "value-key": e.valueKey,
361
+ onInput: (n) => F.onInput(t, n, e)
362
+ }), null, 16, [
363
+ "model-value",
364
+ "disabled",
365
+ "prop",
366
+ "required",
367
+ "label-key",
368
+ "value-key",
369
+ "onInput"
370
+ ])) : F.getCellType(t, e) === "checkbox" ? (O(), y(te, E({
371
+ key: 6,
372
+ "wrap-col": !1,
373
+ "model-value": t[r.property]
374
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
375
+ disabled: F.isInputDisabled(t, e),
376
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
377
+ required: e.required,
378
+ onInput: (n) => F.onInput(t, n, e)
379
+ }), null, 16, [
380
+ "model-value",
381
+ "disabled",
382
+ "prop",
383
+ "required",
384
+ "onInput"
385
+ ])) : F.getCellType(t, e) === "number" ? (O(), y(ne, E({
386
+ key: 7,
387
+ "wrap-col": !1,
388
+ "model-value": t[r.property]
389
+ }, { ref_for: !0 }, F.getInputAttr(t, e), {
390
+ disabled: F.isInputDisabled(t, e),
391
+ prop: n.prop ? `${n.prop}[${i}].${e.prop}` : null,
392
+ required: e.required,
393
+ onInput: (n) => F.onInput(t, n, e)
394
+ }), null, 16, [
395
+ "model-value",
396
+ "disabled",
397
+ "prop",
398
+ "required",
399
+ "onInput"
400
+ ])) : b("v-if", !0)], 64)) : e.dictType || (a = e.options) != null && a.length ? (O(), y(re, {
401
+ key: 1,
402
+ "dict-type": e.dictType,
403
+ "id-as-value": e.idAsValue,
404
+ "label-as-value": e.labelAsValue,
405
+ column: r,
406
+ row: t,
407
+ options: e.options
408
+ }, null, 8, [
409
+ "dict-type",
410
+ "id-as-value",
411
+ "label-as-value",
412
+ "column",
413
+ "row",
414
+ "options"
415
+ ])) : (O(), x(v, { key: 2 }, [w(j(F.getVal(t, r, e)), 1)], 64))];
416
+ })
417
+ ]),
418
+ _: 2
419
+ }, 1032, [
420
+ "label",
421
+ "width",
422
+ "dict-type",
423
+ "clickable",
424
+ "align",
425
+ "prop",
426
+ "options",
427
+ "show-overflow-tooltip"
428
+ ]))), 128))]),
429
+ A(n.$slots, "handle", {
430
+ add: F.add,
431
+ remove: F.remove
432
+ }),
433
+ !n.disabled && F.hasHandleMenus ? (O(), y($, {
434
+ key: 0,
435
+ label: "操作",
436
+ width: "80",
437
+ align: "center",
438
+ prop: "menu"
439
+ }, {
440
+ header: N(({ column: e, $index: t }) => [A(n.$slots, "handle-column-header", {
441
+ column: e,
442
+ index: t
443
+ }, () => [w(j(e.label), 1)])]),
444
+ default: N(({ row: e, $index: t }) => {
445
+ var r, i, a;
446
+ return [(r = n.handleMenus) != null && r.includes("add") && ((i = n.modelValue) == null ? void 0 : i.length) < n.limit ? (O(), x("i", {
447
+ key: 0,
448
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
449
+ style: {
450
+ "margin-right": "5px",
451
+ "font-size": "20px",
452
+ cursor: "pointer"
453
+ },
454
+ title: "添加",
455
+ onClick: P((n) => F.add(e, t), ["stop"])
456
+ }, null, 8, G)) : b("v-if", !0), (a = n.handleMenus) != null && a.includes("delete") ? (O(), y(ie, {
457
+ key: 1,
458
+ class: "el-icon-error sub-table-handle-button table-button-remove",
459
+ title: "删除",
460
+ message: "您确定要删除该行吗?",
461
+ onClick: P((n) => F.remove(e, t), ["stop"])
462
+ }, null, 8, ["onClick"])) : b("v-if", !0)];
463
+ }),
464
+ _: 3
465
+ })) : b("v-if", !0)
466
+ ]),
467
+ _: 2
468
+ }, [!n.disabled || F.hasToolBarMenu ? {
469
+ name: "toolbar",
470
+ fn: N(() => [S("div", B, [A(n.$slots, "toolbar", {
471
+ addRow: F.addRow,
472
+ delRow: F.delRow,
473
+ refresh: F.refresh
474
+ }, () => [S("div", V, [A(n.$slots, "toolbar-left", {
475
+ addRow: F.addRow,
476
+ delRow: F.delRow,
477
+ refresh: F.refresh
478
+ }, () => {
479
+ var e, t, r;
480
+ return [
481
+ (e = n.toolbarMenus) != null && e.includes("add") ? (O(), y(R, {
482
+ key: 0,
483
+ class: "table-header-button add",
484
+ icon: "el-icon-circle-plus",
485
+ type: "text",
486
+ onClick: F.addRow
487
+ }, {
488
+ default: N(() => [...a[2] || (a[2] = [w(" 添加 ", -1)])]),
489
+ _: 1
490
+ }, 8, ["onClick"])) : b("v-if", !0),
491
+ (t = n.toolbarMenus) != null && t.includes("delete") ? (O(), y(z, {
492
+ key: 1,
493
+ disabled: _.selectedRows.length <= 0,
494
+ class: "table-header-button remove",
495
+ message: "您确定要删除选中的记录吗?",
496
+ icon: "el-icon-error",
497
+ type: "text",
498
+ onClick: F.delRow
499
+ }, {
500
+ default: N(() => [...a[3] || (a[3] = [w(" 删除 ", -1)])]),
501
+ _: 1
502
+ }, 8, ["disabled", "onClick"])) : b("v-if", !0),
503
+ (r = n.toolbarMenus) != null && r.includes("refresh") ? (O(), y(R, {
504
+ key: 2,
505
+ class: "table-header-button refresh",
506
+ icon: "el-icon-refresh-left",
507
+ type: "text",
508
+ disabled: !1,
509
+ onClick: F.refresh
510
+ }, {
511
+ default: N(() => [...a[4] || (a[4] = [w(" 刷新 ", -1)])]),
512
+ _: 1
513
+ }, 8, ["onClick"])) : b("v-if", !0)
514
+ ];
515
+ }), A(n.$slots, "toolbar-left-append", {
516
+ addRow: F.addRow,
517
+ delRow: F.delRow,
518
+ refresh: F.refresh
519
+ })]), S("div", H, [A(n.$slots, "toolbar-right", {
520
+ removeSelectedRows: F.removeSelectedRows,
521
+ selectedRows: _.selectedRows
522
+ })])])])]),
523
+ key: "0"
524
+ } : void 0, n.bottomAddButton ? {
525
+ name: "empty",
526
+ fn: N(() => [S("i", {
527
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
528
+ style: {
529
+ "font-size": "20px",
530
+ cursor: "pointer"
531
+ },
532
+ title: "添加",
533
+ onClick: a[0] || (a[0] = P((e) => {
534
+ var t;
535
+ return F.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
536
+ }, ["stop"]))
537
+ })]),
538
+ key: "1"
539
+ } : void 0]), 1040, [
540
+ "data",
541
+ "api",
542
+ "show-summary",
543
+ "descs",
544
+ "ascs",
545
+ "page-size",
546
+ "selection-width",
547
+ "selection",
548
+ "index",
549
+ "onSelectionChange"
550
+ ]),
551
+ b("底部添加按钮"),
552
+ !n.disabled && n.bottomAddButton && ((I = n.modelValue) == null ? void 0 : I.length) < n.limit && ((L = n.modelValue) == null ? void 0 : L.length) > 0 ? (O(), x("div", K, [S("i", {
553
+ class: "el-icon-circle-plus sub-table-handle-button table-button-add",
554
+ style: {
555
+ "font-size": "20px",
556
+ cursor: "pointer"
557
+ },
558
+ title: "添加",
559
+ onClick: a[1] || (a[1] = P((e) => {
560
+ var t;
561
+ return F.add(null, ((t = n.modelValue) == null ? void 0 : t.length) ?? 0);
562
+ }, ["stop"]))
563
+ })])) : b("v-if", !0)
564
+ ], 2);
565
+ }
566
+ var J = /* @__PURE__ */ a(z, [["render", q]]);
567
+ //#endregion
568
+ export { R as n, J as t };