@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
@@ -1,107 +0,0 @@
1
- import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants/index.mjs";
2
- import n from "../empty-view/index.mjs";
3
- import { Fragment as r, computed as i, createTextVNode as a, createVNode as o, h as s, inject as c, isVNode as l, onBeforeUnmount as u, onMounted as d, provide as f, reactive as p, ref as m, toRef as h, toRefs as g, useTemplateRef as _, vShow as v, watchEffect as y, withDirectives as b } from "vue";
4
- import { ElCol as x, ElCollapseTransition as S } from "element-plus";
5
- import { ElRow as C } from "element-plus/es";
6
- //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
- function w(e) {
8
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
9
- }
10
- //#endregion
11
- //#region src/components/form/FormItemGroup.vue
12
- var T = {
13
- name: "FormItemGroup",
14
- props: {
15
- blockTitle: String,
16
- tips: String,
17
- active: Boolean,
18
- enabled: {
19
- type: Boolean,
20
- default: void 0
21
- },
22
- disabled: {
23
- type: Boolean,
24
- default: void 0
25
- },
26
- tag: {
27
- type: String,
28
- default: "ElCol"
29
- },
30
- span: {
31
- type: Number,
32
- default: 24
33
- },
34
- block: {
35
- type: Boolean,
36
- default: !0
37
- },
38
- wrapRow: {
39
- type: Boolean,
40
- default: !0
41
- },
42
- gutter: {
43
- type: Number,
44
- default: 20
45
- },
46
- collapse: Boolean,
47
- showTitle: {
48
- type: Boolean,
49
- default: !0
50
- },
51
- notDispatch: Boolean
52
- },
53
- setup(l, { expose: T, slots: E }) {
54
- let D = c(t, null), O = _("root"), k = m(!0), A = h(() => l.enabled), j = h(() => l.disabled), M = i(() => l.enabled === !0 ? !1 : l.disabled === !0), N = i(() => l.tag === "ElCol"), P = () => k.value = !k.value, F = p({
55
- el: h(() => N.value ? O.value.$el : O.value),
56
- disabled: j,
57
- enabled: A,
58
- isDisabled: M,
59
- open: () => {
60
- k.value = !0;
61
- },
62
- expand: k,
63
- ...g(l)
64
- });
65
- return y(() => {
66
- k.value = !l.collapse;
67
- }), f(e, F), d(() => {
68
- l.notDispatch || D == null || D.addGroup(F);
69
- }), u(() => {
70
- l.notDispatch || D == null || D.removeGroup(F);
71
- }), T(F), () => {
72
- let e = () => {
73
- var e;
74
- return o(r, null, [b(o("div", {
75
- class: "form-item-group-title",
76
- onClick: P
77
- }, [o("span", {
78
- class: "flex-item",
79
- style: "flex: 1"
80
- }, [
81
- E.title ? E.title() : l.blockTitle,
82
- E.tips || l.tips ? o("span", { style: "color: #ff0000; font-size: 14px" }, [
83
- a("("),
84
- E.tips ? E.tips() : l.tips,
85
- a(")")
86
- ]) : null,
87
- (e = E["title-right"]) == null ? void 0 : e.call(E)
88
- ]), o("i", { class: k.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[v, l.showTitle]]), o(S, null, { default: () => {
89
- let e;
90
- return E.default ? l.wrapRow ? b(o(C, { gutter: l.gutter }, w(e = E.default()) ? e : { default: () => [e] }), [[v, k.value]]) : b(o("div", null, [E.default()]), [[v, k.value]]) : b(o(n, {
91
- "font-size": "14px",
92
- "empty-tips": "暂无信息"
93
- }, null), [[v, k.value]]);
94
- } })]);
95
- }, t = {
96
- ref: "root",
97
- class: ["form-item-group", {
98
- "default-active": l.active,
99
- "is-disabled": M.value
100
- }]
101
- };
102
- return N.value && (t.span = l.block ? 24 : l.span), s(N.value ? x : "div", t, N.value ? e : e());
103
- };
104
- }
105
- };
106
- //#endregion
107
- export { T as t };
@@ -1,568 +0,0 @@
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 };