@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40

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 (189) 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 -0
  6. package/chunks/B1MSrc6f.mjs +8 -0
  7. package/chunks/B3ajWLh3.mjs +198 -0
  8. package/chunks/BH_JJ8Xh.mjs +106 -0
  9. package/chunks/BWBHzD5N.mjs +89 -0
  10. package/chunks/Bd1UFJic.mjs +660 -0
  11. package/chunks/Bm5eiSmT.mjs +79 -0
  12. package/chunks/BsCS7SB5.mjs +141 -0
  13. package/chunks/BufIRDd0.mjs +185 -0
  14. package/chunks/C1AgOUe_.mjs +172 -0
  15. package/chunks/C3Uo82-I.mjs +35 -0
  16. package/chunks/C9dGL28n.mjs +56 -0
  17. package/chunks/CFOGMFgo.mjs +150 -0
  18. package/chunks/CLPSCSsy.mjs +603 -0
  19. package/chunks/CSyJ-vEx.mjs +17 -0
  20. package/chunks/CTKmEf2M.mjs +93 -0
  21. package/chunks/CWfUPCtS.mjs +1360 -0
  22. package/chunks/CXvGoZKJ.mjs +198 -0
  23. package/chunks/Cab-ZjRx.mjs +164 -0
  24. package/chunks/ChmDDqoZ2.mjs +478 -0
  25. package/chunks/Cj59E77g.mjs +230 -0
  26. package/chunks/CqTcEefA.mjs +93 -0
  27. package/chunks/Ct5bDJ50.mjs +38 -0
  28. package/chunks/CuG2Q-PM.mjs +100 -0
  29. package/chunks/D8UVq1t1.mjs +176 -0
  30. package/chunks/DDmQcNm6.mjs +93 -0
  31. package/chunks/DF9fJMQS.mjs +105 -0
  32. package/chunks/DJe97Fgi.mjs +107 -0
  33. package/chunks/DXYgAmil.mjs +317 -0
  34. package/chunks/DhtHh0jk.mjs +87 -0
  35. package/chunks/DiJyms_r.mjs +100 -0
  36. package/chunks/Ds_Tpa_M.mjs +83 -0
  37. package/chunks/TvNHGVAP.mjs +25 -0
  38. package/chunks/XCGWTz41.mjs +25 -0
  39. package/chunks/XqRTtFfp.mjs +166 -0
  40. package/chunks/cmuHpsX6.mjs +109 -0
  41. package/chunks/o6VhYAN52.mjs +207 -0
  42. package/chunks/pdwFQpA8.mjs +57 -0
  43. package/chunks/taicx2sd.mjs +25 -0
  44. package/confirm-button/index.d.ts +113 -0
  45. package/confirm-button/index.mjs +35 -0
  46. package/confirmable/index.d.ts +84 -0
  47. package/confirmable/index.mjs +8 -0
  48. package/constants/index.d.ts +53 -0
  49. package/constants/index.mjs +4 -0
  50. package/editable-tree/index.d.ts +254 -0
  51. package/editable-tree/index.mjs +2 -0
  52. package/editable-tree/style.css +1 -0
  53. package/element-dialog/index.d.ts +337 -16
  54. package/element-dialog/index.mjs +2 -91
  55. package/empty-view/index.d.ts +2 -2
  56. package/empty-view/index.mjs +1 -1
  57. package/flex-scroll-area/index.d.ts +1 -1
  58. package/flex-scroll-area/index.mjs +1 -1
  59. package/form-advice/index.mjs +13 -12
  60. package/form-button/index.d.ts +114 -0
  61. package/form-button/index.mjs +36 -0
  62. package/form-card/index.d.ts +14 -0
  63. package/form-card/index.mjs +18 -0
  64. package/form-cascader/index.d.ts +472 -0
  65. package/form-cascader/index.mjs +2 -0
  66. package/form-check-box-group/index.d.ts +289 -18
  67. package/form-check-box-group/index.mjs +1 -1
  68. package/form-check-box-group/style.css +1 -0
  69. package/form-checkbox/index.d.ts +236 -16
  70. package/form-checkbox/index.mjs +1 -1
  71. package/form-date-picker/index.d.ts +390 -19
  72. package/form-date-picker/index.mjs +1 -1
  73. package/form-holder/index.d.ts +87 -20
  74. package/form-holder/index.mjs +1 -1
  75. package/form-holder/style.css +1 -1
  76. package/form-image/index.d.ts +145 -13
  77. package/form-image/index.mjs +1 -1
  78. package/form-input/index.d.ts +301 -20
  79. package/form-input/index.mjs +1 -1
  80. package/form-input/style.css +1 -0
  81. package/form-input-cron-expression/index.d.ts +217 -0
  82. package/form-input-cron-expression/index.mjs +2 -0
  83. package/form-input-cron-expression/style.css +1 -0
  84. package/form-input-email/index.d.ts +307 -16
  85. package/form-input-email/index.mjs +1 -1
  86. package/form-input-id-card/index.d.ts +307 -16
  87. package/form-input-id-card/index.mjs +1 -1
  88. package/form-input-number/index.d.ts +246 -18
  89. package/form-input-number/index.mjs +1 -1
  90. package/form-input-phone-number/index.d.ts +307 -16
  91. package/form-input-phone-number/index.mjs +1 -1
  92. package/form-input-tag/index.d.ts +263 -1
  93. package/form-input-tag/index.mjs +1 -3
  94. package/form-input-time/index.d.ts +434 -1
  95. package/form-input-time/index.mjs +1 -3
  96. package/form-item-config-provider/index.d.ts +22 -0
  97. package/form-item-config-provider/index.mjs +24 -0
  98. package/form-item-group/index.d.ts +91 -17
  99. package/form-item-group/index.mjs +2 -78
  100. package/form-item-group/style.css +1 -1
  101. package/form-item-x/index.d.ts +141 -11
  102. package/form-item-x/index.mjs +1 -1
  103. package/form-item-x/style.css +1 -0
  104. package/form-radio-group/index.d.ts +303 -16
  105. package/form-radio-group/index.mjs +1 -1
  106. package/form-rate/index.d.ts +254 -14
  107. package/form-rate/index.mjs +1 -1
  108. package/form-red-table/index.mjs +27 -26
  109. package/form-row/index.d.ts +2 -2
  110. package/form-row/index.mjs +1 -1
  111. package/form-select/index.d.ts +537 -18
  112. package/form-select/index.mjs +1 -1
  113. package/form-slider/index.d.ts +283 -16
  114. package/form-slider/index.mjs +1 -1
  115. package/form-switch/index.d.ts +272 -14
  116. package/form-switch/index.mjs +1 -1
  117. package/form-text/index.d.ts +165 -13
  118. package/form-text/index.mjs +1 -1
  119. package/form-textarea/index.d.ts +351 -0
  120. package/form-textarea/index.mjs +2 -0
  121. package/form-time-select/index.d.ts +319 -0
  122. package/form-time-select/index.mjs +2 -0
  123. package/form-view/index.mjs +1 -1
  124. package/helper/dictionary.d.ts +15 -0
  125. package/helper/dictionary.mjs +97 -0
  126. package/hook/useDictionary.d.ts +60 -0
  127. package/hook/useDictionary.mjs +15 -0
  128. package/hook/useVisibilityChange.d.ts +4 -0
  129. package/hook/useVisibilityChange.mjs +14 -0
  130. package/iframe-window/index.d.ts +9 -0
  131. package/iframe-window/index.mjs +37 -0
  132. package/iframe-window/style.css +1 -0
  133. package/index.d.ts +52 -36
  134. package/index.mjs +54 -61
  135. package/package.json +10 -5
  136. package/pageable-table/index.d.ts +398 -0
  137. package/pageable-table/index.mjs +2 -0
  138. package/pageable-table/style.css +1 -0
  139. package/resize-observer/index.d.ts +8 -0
  140. package/resize-observer/index.mjs +40 -0
  141. package/resize-observer/style.css +1 -0
  142. package/resolver/index.mjs +29 -0
  143. package/table-column/index.d.ts +160 -0
  144. package/table-column/index.mjs +2 -0
  145. package/table-column/style.css +1 -0
  146. package/table-column-def/index.d.ts +85 -0
  147. package/table-column-def/index.mjs +11 -0
  148. package/table-view/index.d.ts +340 -1
  149. package/table-view/index.mjs +453 -6
  150. package/table-view/style.css +1 -0
  151. package/toolbar/index.d.ts +128 -1
  152. package/toolbar/index.mjs +1 -8
  153. package/toolbar/style.css +1 -0
  154. package/toolbar-button/index.d.ts +188 -1
  155. package/toolbar-button/index.mjs +1 -8
  156. package/vue-cron/index.d.ts +191 -0
  157. package/vue-cron/index.mjs +2 -0
  158. package/vue-cron/style.css +1 -0
  159. package/web-types.json +1 -1
  160. package/x-input-tag/index.d.ts +2 -0
  161. package/x-input-tag/index.mjs +227 -0
  162. package/x-input-tag/style.css +1 -0
  163. package/year-calendar/index.d.ts +99 -0
  164. package/year-calendar/index.mjs +2 -0
  165. package/year-calendar/style.css +1 -0
  166. package/chunks/B4M_TFeR.mjs +0 -152
  167. package/chunks/B5BIQCcK.mjs +0 -149
  168. package/chunks/BHNKrW1j.mjs +0 -61
  169. package/chunks/BO9jWhBl.mjs +0 -46
  170. package/chunks/BZ8aOa78.mjs +0 -35
  171. package/chunks/Bsz7y4Xp.mjs +0 -73
  172. package/chunks/Bxj372sF.mjs +0 -53
  173. package/chunks/C33EmJN8.mjs +0 -32
  174. package/chunks/C6Li3-l7.mjs +0 -28
  175. package/chunks/CBcdalMX.mjs +0 -35
  176. package/chunks/CdRsyF0n.mjs +0 -43
  177. package/chunks/ClNahmiU.mjs +0 -23
  178. package/chunks/CstztYMu.mjs +0 -28
  179. package/chunks/DC9b53M6.mjs +0 -32
  180. package/chunks/DDVAgRED.mjs +0 -36
  181. package/chunks/DpJQABVD.mjs +0 -91
  182. package/chunks/ZsLNWI9x.mjs +0 -46
  183. package/chunks/jn_iQrVZ.mjs +0 -28
  184. package/constants.d.ts +0 -1
  185. package/constants.mjs +0 -4
  186. package/input/style.css +0 -1
  187. package/resolver.mjs +0 -79
  188. package/utils/style.css +0 -1
  189. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -1,9 +1,456 @@
1
+ import { c as e, r as t } from "../chunks/cmuHpsX6.mjs";
2
+ import { processButtons as n, reloadTable as r } from "../api/index.mjs";
3
+ import { tableViewContextKey as i } from "../constants/index.mjs";
4
+ import { t as a } from "../chunks/Bd1UFJic.mjs";
5
+ import { t as o } from "../chunks/B1MSrc6f.mjs";
6
+ import { a as s } from "../chunks/Cj59E77g.mjs";
7
+ import c from "../form-item-config-provider/index.mjs";
8
+ import { t as l } from "../chunks/CLPSCSsy.mjs";
9
+ import { t as u } from "../chunks/o6VhYAN52.mjs";
10
+ import { hasOwn as d, isArray as f, isFunction as p, isString as m, toStringArray as h, trace as g, warning as _ } from "@web-utils/core";
11
+ import { Transition 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, normalizeStyle as O, openBlock as k, renderList as A, renderSlot as j, toDisplayString as M, toHandlers as N, vShow as P, withCtx as F, withDirectives as I, withModifiers as L } from "vue";
12
+ import { merge as R } from "@web-utils/integrations/lodash";
13
+ import { ElButton as z, ElCollapseTransition as B, ElForm as V, ElFormItem as H, ElRow as U } from "element-plus/es";
1
14
  //#region src/components/form/TableView.vue
2
- var e = /* @__PURE__ */ Object.assign({ name: "TableView" }, {
3
- __name: "TableView",
4
- setup(e) {
5
- return (e, t) => null;
15
+ var W = [
16
+ "back",
17
+ "create",
18
+ "save",
19
+ "withdraw",
20
+ "edit",
21
+ "submit",
22
+ "publish",
23
+ "agree",
24
+ "disagree",
25
+ "reject",
26
+ "finish",
27
+ "cancel",
28
+ "enable",
29
+ "exp",
30
+ "imp",
31
+ "del",
32
+ "disabled",
33
+ "reload",
34
+ "slot"
35
+ ], G = {
36
+ name: "TableView",
37
+ bus: {
38
+ reloadTableView(e) {
39
+ if (this._viewIds) if (m(e) || f(e)) {
40
+ let t = e;
41
+ m(t) && (t = t.split(",")), this._viewIds.some((e) => t.includes(e)) && (g.call(this.$parent || {}, "reloadTableView"), this.reloadTable());
42
+ } else _.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
43
+ },
44
+ reloadTreeView(e) {
45
+ if (this._viewIds) if (m(e) || f(e)) {
46
+ let t = e;
47
+ m(t) && (t = t.split(",")), this._viewIds.some((e) => t.includes(e)) && this.$refs.tree && (g.call(this.$parent || {}, "reloadTreeView"), this.reloadTree());
48
+ } else _.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
49
+ }
50
+ },
51
+ provide() {
52
+ return { [i]: this };
53
+ },
54
+ props: {
55
+ viewId: [String, Array],
56
+ searchPanelAttrs: {
57
+ type: Object,
58
+ default: () => {}
59
+ },
60
+ toolbarAttrs: {
61
+ type: Object,
62
+ default: () => {}
63
+ },
64
+ toolbarListeners: Object,
65
+ treeAttrs: {
66
+ type: Object,
67
+ default: () => {}
68
+ },
69
+ treeListeners: Object,
70
+ tableAttrs: Object,
71
+ searchModel: Object,
72
+ tableListeners: {
73
+ type: Object,
74
+ default: () => {}
75
+ },
76
+ deleteApi: Function,
77
+ borderTop: Boolean,
78
+ borderBottom: Boolean,
79
+ borderLeft: Boolean,
80
+ borderRight: Boolean,
81
+ border: {
82
+ type: Boolean,
83
+ default: !0
84
+ },
85
+ labelWidth: {
86
+ type: String,
87
+ default: "120px"
88
+ },
89
+ formPath: [String, Function],
90
+ searchFormPosition: {
91
+ type: String,
92
+ default: "top"
93
+ },
94
+ embed: Boolean,
95
+ deleteTips: String,
96
+ selectTips: String,
97
+ rowKey: {
98
+ type: String,
99
+ default: "id"
100
+ },
101
+ expandSearch: Boolean,
102
+ showToolbar: {
103
+ type: Boolean,
104
+ default: !0
105
+ }
106
+ },
107
+ emits: ["reset"],
108
+ data() {
109
+ return {
110
+ importDialogVisible: !1,
111
+ selectedRows: [],
112
+ isSearchVisible: !1
113
+ };
114
+ },
115
+ computed: {
116
+ buttonSlots() {
117
+ return W.filter((e) => this.$slots[e]);
118
+ },
119
+ toolbarProps() {
120
+ var e, t;
121
+ let r = R({}, this.toolbarAttrs, {}), i = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
122
+ return i = i || [], r.buttons = i, r.buttons = n(r.buttons), r.buttons = h(r.buttons), r.searchable = !!((e = (t = this.$slots)["search-form"]) != null && e.call(t)), r;
123
+ },
124
+ treeProps() {
125
+ return e(R({}, this.treeAttrs, {
126
+ treeProps: {
127
+ children: "children",
128
+ label: "label",
129
+ isLeaf: (e) => d(e, "hasChildren") ? !e.hasChildren : d(e, "hasChild") ? !e.hasChild : !0
130
+ },
131
+ show: !1,
132
+ lazy: !0,
133
+ readonly: !0,
134
+ data: [],
135
+ expandFirstNode: !0,
136
+ defaultExpandAll: !1
137
+ }));
138
+ },
139
+ tableProps() {
140
+ let t = this.tableAttrs.api || this.$parent.getPage, n = {
141
+ model: this.searchModel || {},
142
+ height: "auto",
143
+ highlightCurrentRow: !0,
144
+ api: t
145
+ };
146
+ return e(R({}, this.tableAttrs, n));
147
+ },
148
+ searchPanelProps() {
149
+ let t = {
150
+ width: 350,
151
+ model: this.searchModel || {}
152
+ };
153
+ return e(R({}, this.searchPanelAttrs, t));
154
+ },
155
+ toolbarEventHandlers() {
156
+ if (this.toolbarListeners) {
157
+ let { exp: e, ...t } = this.toolbarListeners;
158
+ return t;
159
+ }
160
+ return {};
161
+ },
162
+ tableScopeSlotNames() {
163
+ var e;
164
+ return ((e = this.tableAttrs) == null || (e = e.columns) == null ? void 0 : e.map((e) => e.prop).filter((e) => this.$slots[e])) ?? [];
165
+ }
166
+ },
167
+ watch: { expandSearch: {
168
+ immediate: !0,
169
+ handler(e) {
170
+ this.isSearchVisible = e;
171
+ }
172
+ } },
173
+ created() {
174
+ this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
175
+ },
176
+ activated() {
177
+ this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
178
+ },
179
+ methods: {
180
+ toHyphenateKey: e,
181
+ onTreeScroll() {
182
+ this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
183
+ },
184
+ toggleSearch() {
185
+ this.isSearchVisible = !this.isSearchVisible;
186
+ },
187
+ onSearchClick() {
188
+ this.reloadTable();
189
+ },
190
+ onClearClick() {
191
+ this.$emit("reset"), this.$refs.form.resetFields(), this.reloadTable();
192
+ },
193
+ openFrom(e) {
194
+ this.$router.push(t(this.formPath, e));
195
+ },
196
+ rowDbClick(e) {
197
+ var t;
198
+ !((t = this.tableListeners) != null && t["row-dblclick"]) && this.formPath && this.openFrom(e);
199
+ },
200
+ onSelectionChange(e) {
201
+ this.selectedRows = e;
202
+ },
203
+ create() {
204
+ var e;
205
+ !((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
206
+ },
207
+ async del() {
208
+ var e;
209
+ let t = this.deleteApi || this.$parent.del;
210
+ if (!((e = this.toolbarListeners) != null && e.del) && p(t)) {
211
+ if (!this.selectedRows.length) {
212
+ this.$message.warning(this.selectTips || "请选择要删除的记录!");
213
+ return;
214
+ }
215
+ await this.$confirm(this.deleteTips || `您确定要删除选中的[<span class="break-word" style="color: orange">${this.selectedRows.length}</span>]行记录吗?`, "系统提示", {
216
+ type: "warning",
217
+ modal: !0,
218
+ dangerouslyUseHTMLString: !0,
219
+ closeOnClickModal: !1,
220
+ beforeClose: async (e, n, i) => {
221
+ if (e === "confirm") try {
222
+ n.confirmButtonLoading = !0, n.confirmButtonText = "删除...";
223
+ let e = await t.call(this, this.selectedRows.map((e) => e[this.rowKey]));
224
+ this.$message.success(e.data.msg || "删除成功"), this.reloadTableAndTree(), r();
225
+ } catch {}
226
+ i();
227
+ }
228
+ }).catch((e) => e);
229
+ }
230
+ },
231
+ reloadTable() {
232
+ var e;
233
+ (e = this.$refs.table) == null || e.reload();
234
+ },
235
+ async refreshTable(e) {
236
+ var t;
237
+ await ((t = this.$refs.table) == null ? void 0 : t.getPage(e));
238
+ },
239
+ reloadTree() {
240
+ var e;
241
+ (e = this.$refs.tree) == null || e.reloadTree();
242
+ },
243
+ reloadTableAndTree() {
244
+ this.reloadTable(), this.reloadTree();
245
+ },
246
+ currentRow() {
247
+ return this.$refs.table.currentRow;
248
+ },
249
+ getPageQuery() {
250
+ return this.$refs.table.getPageQuery();
251
+ },
252
+ exp() {
253
+ var e, t;
254
+ (e = (t = this.toolbarListeners).exp) == null || e.call(t, this.selectedRows);
255
+ },
256
+ getTableColumns() {
257
+ return this.$refs.table.tableColumns;
258
+ }
6
259
  }
7
- });
260
+ }, K = { class: "table-view-wrapper" }, q = {
261
+ key: 0,
262
+ class: "search-form-top"
263
+ }, J = { class: "table-view-content-wrapper" }, Y = { class: "table-view-content" }, X = { class: "table-view-table" }, Z = { class: "slide-panel-content" }, Q = { class: "slide-panel-actions" };
264
+ function $(e, t, n, r, i, o) {
265
+ let d = z, f = s, p = U, m = c, h = V, g = B, _ = u, R = a, W = l, G = H;
266
+ return k(), x("div", { class: D(["table-view", {
267
+ embed: n.embed,
268
+ "has-tree": o.treeProps.show
269
+ }]) }, [S("div", K, [
270
+ b("搜索条件"),
271
+ n.searchFormPosition === "top" ? (k(), y(g, { key: 0 }, {
272
+ default: F(() => [o.toolbarProps.searchable ? I((k(), x("div", q, [T(h, {
273
+ ref: "form",
274
+ "label-position": "right",
275
+ model: n.searchModel || o.searchPanelProps.model,
276
+ "label-width": n.labelWidth,
277
+ onSubmitCapture: L(o.onSearchClick, ["prevent"])
278
+ }, {
279
+ default: F(() => [T(m, { reactive: "" }, {
280
+ default: F(() => [T(p, { gutter: 0 }, {
281
+ default: F(() => [j(e.$slots, "search-form", {}, () => [t[3] || (t[3] = S("p", null, "请添加搜索条件!", -1))]), T(f, {
282
+ class: "search-actions",
283
+ "hide-label": "",
284
+ "fixed-span": 24
285
+ }, {
286
+ default: F(() => [T(d, {
287
+ type: "primary",
288
+ "native-type": "submit"
289
+ }, {
290
+ default: F(() => [...t[4] || (t[4] = [w("开始搜索", -1)])]),
291
+ _: 1
292
+ }), T(d, {
293
+ style: { "margin-left": "10px" },
294
+ onClick: o.onClearClick
295
+ }, {
296
+ default: F(() => [...t[5] || (t[5] = [w("清除条件", -1)])]),
297
+ _: 1
298
+ }, 8, ["onClick"])]),
299
+ _: 1
300
+ })]),
301
+ _: 3
302
+ })]),
303
+ _: 3
304
+ })]),
305
+ _: 3
306
+ }, 8, [
307
+ "model",
308
+ "label-width",
309
+ "onSubmitCapture"
310
+ ])], 512)), [[P, i.isSearchVisible]]) : b("v-if", !0)]),
311
+ _: 3
312
+ })) : b("v-if", !0),
313
+ b("顶部工具条"),
314
+ n.showToolbar ? (k(), y(_, E({ key: 1 }, o.toolbarProps, {
315
+ refreshable: "",
316
+ onSearch: o.toggleSearch,
317
+ onSettings: t[0] || (t[0] = () => e.$refs.table.toggleSettings()),
318
+ onDel: o.del,
319
+ onCreate: o.create,
320
+ onReload: o.reloadTableAndTree,
321
+ onExp: o.exp,
322
+ onImp: t[1] || (t[1] = (e) => i.importDialogVisible = !0)
323
+ }, N(o.toolbarEventHandlers)), C({ _: 2 }, [
324
+ e.$slots["toolbar-button"] ? {
325
+ name: "default",
326
+ fn: F(() => [j(e.$slots, "toolbar-button", { selectedRows: i.selectedRows })]),
327
+ key: "0"
328
+ } : void 0,
329
+ e.$slots["toolbar-left"] ? {
330
+ name: "toolbar-left",
331
+ fn: F(() => [j(e.$slots, "toolbar-left", { selectedRows: i.selectedRows })]),
332
+ key: "1"
333
+ } : void 0,
334
+ e.$slots["toolbar-right"] ? {
335
+ name: "toolbar-right",
336
+ fn: F(() => [j(e.$slots, "toolbar-right", {
337
+ del: o.del,
338
+ create: o.create,
339
+ reload: o.reloadTableAndTree,
340
+ selectedRows: i.selectedRows
341
+ })]),
342
+ key: "2"
343
+ } : void 0,
344
+ e.$slots["toolbar-right-button"] ? {
345
+ name: "toolbar-right-button",
346
+ fn: F(() => [j(e.$slots, "toolbar-right-button")]),
347
+ key: "3"
348
+ } : void 0,
349
+ A(o.buttonSlots, (t) => ({
350
+ name: t,
351
+ fn: F(() => [j(e.$slots, t, { selectedRows: i.selectedRows })])
352
+ }))
353
+ ]), 1040, [
354
+ "onSearch",
355
+ "onDel",
356
+ "onCreate",
357
+ "onReload",
358
+ "onExp"
359
+ ])) : b("v-if", !0),
360
+ S("div", J, [
361
+ S("div", Y, [
362
+ b("侧栏"),
363
+ o.treeProps.show ? (k(), x("div", {
364
+ key: 0,
365
+ ref: "treeScroller",
366
+ class: "table-view-sidebar",
367
+ onScroll: t[2] || (t[2] = (...e) => o.onTreeScroll && o.onTreeScroll(...e))
368
+ }, [b("<div style=\"font-size: 16px\">视图导航</div>"), T(R, E({ ref: "tree" }, o.treeProps, { readonly: "" }, N(o.toHyphenateKey(n.treeListeners))), {
369
+ default: F(({ node: t, data: n }) => [j(e.$slots, "tree-node", {
370
+ node: t,
371
+ data: n
372
+ }, () => [S("span", null, [S("i", { class: D([t.childNodes.length > 0 ? t.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets", "node-icon"]) }, null, 2), j(e.$slots, "tree-label", {
373
+ node: t,
374
+ data: n
375
+ }, () => [w(M(t.label), 1)])])])]),
376
+ _: 3
377
+ }, 16)], 544)) : b("v-if", !0),
378
+ b("表格"),
379
+ S("div", X, [T(W, E({
380
+ ref: "table",
381
+ border: n.border,
382
+ class: [{
383
+ "border-top": n.borderTop,
384
+ "border-bottom": n.borderBottom,
385
+ "border-left": n.borderLeft || n.treeAttrs && n.treeAttrs.show,
386
+ "border-right": n.borderRight
387
+ }]
388
+ }, o.tableProps, N(o.toHyphenateKey(n.tableListeners)), {
389
+ onRowDblclick: o.rowDbClick,
390
+ onSelectionChange: o.onSelectionChange
391
+ }), C({
392
+ default: F(() => [j(e.$slots, "columns")]),
393
+ _: 2
394
+ }, [A(o.tableScopeSlotNames, (t) => ({
395
+ name: t,
396
+ fn: F(({ row: n }) => [j(e.$slots, t, { row: n })])
397
+ }))]), 1040, [
398
+ "border",
399
+ "class",
400
+ "onRowDblclick",
401
+ "onSelectionChange"
402
+ ])])
403
+ ]),
404
+ b("搜索条件"),
405
+ n.searchFormPosition === "right" ? (k(), y(v, {
406
+ key: 0,
407
+ name: "slide"
408
+ }, {
409
+ default: F(() => [o.toolbarProps.searchable ? I((k(), x("div", {
410
+ key: 0,
411
+ style: O({ width: `${o.searchPanelProps.width}px` }),
412
+ class: "slide-panel"
413
+ }, [b("<div class=\"slide-panel-line\">\n <div class=\"slide-panel-line-indicator\"></div>\n </div>"), S("div", Z, [T(h, {
414
+ ref: "form",
415
+ "label-position": "right",
416
+ model: n.searchModel || o.searchPanelProps.model,
417
+ "label-width": n.labelWidth,
418
+ onSubmitCapture: L(o.onSearchClick, ["prevent"])
419
+ }, {
420
+ default: F(() => [T(m, {
421
+ block: "",
422
+ "wrap-col": !1
423
+ }, {
424
+ default: F(() => [T(p, { gutter: 0 }, {
425
+ default: F(() => [j(e.$slots, "search-form", {}, () => [t[6] || (t[6] = S("p", null, "请添加搜索条件!", -1))])]),
426
+ _: 3
427
+ })]),
428
+ _: 3
429
+ }), T(G, { "label-width": "0" }, {
430
+ default: F(() => [S("div", Q, [T(d, {
431
+ type: "primary",
432
+ "native-type": "submit"
433
+ }, {
434
+ default: F(() => [...t[7] || (t[7] = [w("开始搜索", -1)])]),
435
+ _: 1
436
+ }), T(d, { onClick: o.onClearClick }, {
437
+ default: F(() => [...t[8] || (t[8] = [w("清除条件", -1)])]),
438
+ _: 1
439
+ }, 8, ["onClick"])])]),
440
+ _: 1
441
+ })]),
442
+ _: 3
443
+ }, 8, [
444
+ "model",
445
+ "label-width",
446
+ "onSubmitCapture"
447
+ ])])], 4)), [[P, i.isSearchVisible]]) : b("v-if", !0)]),
448
+ _: 3
449
+ })) : b("v-if", !0)
450
+ ]),
451
+ j(e.$slots, "default")
452
+ ])], 2);
453
+ }
454
+ var ee = /* @__PURE__ */ o(G, [["render", $]]);
8
455
  //#endregion
9
- export { e as default };
456
+ export { ee as default };
@@ -0,0 +1 @@
1
+ .table-view{flex-direction:column;height:100%;padding:10px;display:flex}.table-view.has-tree .table-view-wrapper .pageable-table-wrapper,.table-view.embed{padding:0}.table-view.embed .toolbar{border:1px solid #ebeef5;border-bottom:none}.table-view.embed .table-view-wrapper{box-shadow:none;border-radius:0}.table-view.embed .table-view-wrapper .pageable-table-wrapper{padding:0}.table-view .toolbar{border-bottom:none;height:46px;line-height:46px}.table-view .table-view-wrapper{border-radius:4px;flex-direction:column;height:100%;display:flex;overflow:hidden;box-shadow:0 2px 12px #0000001a}.table-view .table-view-wrapper .pageable-table-wrapper{padding-left:10px;padding-right:10px}.table-view .table-view-wrapper .el-pagination{color:#303133;white-space:nowrap;text-align:left;padding:6px 10px;font-weight:700}.table-view .border-top .el-table--border{border-top:1px solid #ebeef5}.table-view .border-bottom .el-table--border{border-bottom:1px solid #ebeef5}.table-view .border-left .el-table--border,.table-view .border-left .el-pagination{border-left:1px solid #ebeef5}.table-view .border-right .el-table--border{border-right:1px solid #ebeef5}.table-view .node-icon{margin-right:4px}.table-view .table-view-content-wrapper{flex:1;position:relative;overflow:hidden}.table-view .table-view-content{background-color:#fff;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.table-view .table-view-sidebar{background-color:#fafafa;border-top:1px solid #ebeef5;flex-shrink:0;width:240px;height:100%;padding:4px 10px 10px 4px;overflow:auto}.table-view .table-view-sidebar .et-tree-wrapper{display:table;overflow:visible}.table-view .table-view-sidebar .et-tree-wrapper .el-tree{background-color:#0000}.table-view .table-view-table{flex:auto;height:100%}.table-view .search-form-top{background-color:#fff;padding:10px 10px 0}.table-view .search-form-top .el-form-item__content{align-items:center;display:flex}.table-view .search-actions{float:right}.table-view .search-actions .el-form-item__content{text-align:right;justify-content:right}.table-view .slide-panel{z-index:5;background-color:#fff;display:flex;position:absolute;top:0;bottom:0;right:0;box-shadow:0 0 10px 5px #0000001a}.table-view .slide-panel .slide-panel-line{background-color:#ddd;flex-shrink:0;width:3px;height:100%;position:relative}.table-view .slide-panel .slide-panel-line-indicator{background-color:#aaa;width:100%;height:50px;position:absolute;top:50%;left:0;transform:translateY(-50%)}.table-view .slide-panel .slide-panel-actions{justify-content:center;align-items:center;margin-top:10px;display:flex}.table-view .slide-panel .slide-panel-content{flex:1;padding:10px;overflow:auto}.table-view .slide-panel .slide-panel-content .el-date-editor{width:100%}
@@ -1,2 +1,129 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ import { toolbarContextKey } from '../../constants';
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
+ searchable: BooleanConstructor;
4
+ refreshable: BooleanConstructor;
5
+ buttons: {
6
+ type: ArrayConstructor;
7
+ default: () => string[];
8
+ };
9
+ back: FunctionConstructor;
10
+ cancel: FunctionConstructor;
11
+ emitter: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ footer: BooleanConstructor;
16
+ label: ObjectConstructor;
17
+ }>, {}, {}, {}, {
18
+ goBack(): void;
19
+ createButton(key: any, { label, icon, type, separateLine, loadable, circle, onClick, title }: {
20
+ label: any;
21
+ icon: any;
22
+ type: any;
23
+ separateLine?: boolean | undefined;
24
+ loadable: any;
25
+ circle: any;
26
+ onClick: any;
27
+ title: any;
28
+ }): any;
29
+ getLeftButtons(): any[];
30
+ getRightButtons(): any[];
31
+ getSearchButton(): any;
32
+ getRefreshButton(): any;
33
+ getSettingsButton(): any;
34
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
35
+ searchable: BooleanConstructor;
36
+ refreshable: BooleanConstructor;
37
+ buttons: {
38
+ type: ArrayConstructor;
39
+ default: () => string[];
40
+ };
41
+ back: FunctionConstructor;
42
+ cancel: FunctionConstructor;
43
+ emitter: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ footer: BooleanConstructor;
48
+ label: ObjectConstructor;
49
+ }>> & Readonly<{}>, {
50
+ footer: boolean;
51
+ searchable: boolean;
52
+ refreshable: boolean;
53
+ buttons: unknown[];
54
+ emitter: string;
55
+ }, {}, {}, {}, string, () => {
56
+ [toolbarContextKey]: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
57
+ searchable: BooleanConstructor;
58
+ refreshable: BooleanConstructor;
59
+ buttons: {
60
+ type: ArrayConstructor;
61
+ default: () => string[];
62
+ };
63
+ back: FunctionConstructor;
64
+ cancel: FunctionConstructor;
65
+ emitter: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ footer: BooleanConstructor;
70
+ label: ObjectConstructor;
71
+ }>> & Readonly<{}>, {}, {}, {}, {
72
+ goBack(): void;
73
+ createButton(key: any, { label, icon, type, separateLine, loadable, circle, onClick, title }: {
74
+ label: any;
75
+ icon: any;
76
+ type: any;
77
+ separateLine?: boolean | undefined;
78
+ loadable: any;
79
+ circle: any;
80
+ onClick: any;
81
+ title: any;
82
+ }): any;
83
+ getLeftButtons(): any[];
84
+ getRightButtons(): any[];
85
+ getSearchButton(): any;
86
+ getRefreshButton(): any;
87
+ getSettingsButton(): any;
88
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, {}, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
89
+ P: {};
90
+ B: {};
91
+ D: {};
92
+ C: {};
93
+ M: {};
94
+ Defaults: {};
95
+ }, Readonly<globalThis.ExtractPropTypes<{
96
+ searchable: BooleanConstructor;
97
+ refreshable: BooleanConstructor;
98
+ buttons: {
99
+ type: ArrayConstructor;
100
+ default: () => string[];
101
+ };
102
+ back: FunctionConstructor;
103
+ cancel: FunctionConstructor;
104
+ emitter: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ footer: BooleanConstructor;
109
+ label: ObjectConstructor;
110
+ }>> & Readonly<{}>, {}, {}, {}, {
111
+ goBack(): void;
112
+ createButton(key: any, { label, icon, type, separateLine, loadable, circle, onClick, title }: {
113
+ label: any;
114
+ icon: any;
115
+ type: any;
116
+ separateLine?: boolean | undefined;
117
+ loadable: any;
118
+ circle: any;
119
+ onClick: any;
120
+ title: any;
121
+ }): any;
122
+ getLeftButtons(): any[];
123
+ getRightButtons(): any[];
124
+ getSearchButton(): any;
125
+ getRefreshButton(): any;
126
+ getSettingsButton(): any;
127
+ }, {}>;
128
+ }, true, {}, any>;
2
129
  export default _default;
package/toolbar/index.mjs CHANGED
@@ -1,9 +1,2 @@
1
- //#region src/components/form/Toolbar.vue
2
- var e = /* @__PURE__ */ Object.assign({ name: "Toolbar" }, {
3
- __name: "Toolbar",
4
- setup(e) {
5
- return (e, t) => null;
6
- }
7
- });
8
- //#endregion
1
+ import { t as e } from "../chunks/o6VhYAN52.mjs";
9
2
  export { e as default };
@@ -0,0 +1 @@
1
+ .toolbar{background-color:#fff;border-bottom:1px solid #e5e9ec;height:40px;padding:0 10px;line-height:40px;display:flex}.toolbar .toolbar-left{flex:auto}.toolbar .toolbar-left .el-button [class*=\ el-icon-],.toolbar .toolbar-left .el-button [class^=el-icon-]{margin-top:-1px;font-size:15px}.toolbar .toolbar-right .el-button{align-items:center;display:inline-flex}.footer-bar{flex-direction:row;justify-content:center;align-items:center;padding-top:10px;display:flex}.footer-bar .el-button{padding:10px 40px}