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

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/4GMuTlFS.mjs +25 -0
  7. package/chunks/B-YO6Py8.mjs +145 -0
  8. package/chunks/B1MSrc6f.mjs +8 -0
  9. package/chunks/B40JZqF5.mjs +60 -0
  10. package/chunks/BLNpMvUQ.mjs +95 -0
  11. package/chunks/BNQD6fKI.mjs +40 -0
  12. package/chunks/BROfNO6c.mjs +17 -0
  13. package/chunks/BiF8cEVB.mjs +102 -0
  14. package/chunks/Bm5eiSmT.mjs +79 -0
  15. package/chunks/C5BjmbyR.mjs +91 -0
  16. package/chunks/CBHZpxPE.mjs +108 -0
  17. package/chunks/CD2WYSl1.mjs +188 -0
  18. package/chunks/CE0MejA6.mjs +200 -0
  19. package/chunks/CSf0Lu3w.mjs +102 -0
  20. package/chunks/CXSIP67a.mjs +234 -0
  21. package/chunks/ChmDDqoZ2.mjs +478 -0
  22. package/chunks/ClpNoMQe.mjs +37 -0
  23. package/chunks/Csa9EgOO.mjs +152 -0
  24. package/chunks/CuBH-6_y.mjs +25 -0
  25. package/chunks/CybmpSN8.mjs +664 -0
  26. package/chunks/CzvmkGvn.mjs +89 -0
  27. package/chunks/DASUt7ot.mjs +166 -0
  28. package/chunks/DBNqhkDl.mjs +174 -0
  29. package/chunks/DMcUruCK2.mjs +207 -0
  30. package/chunks/DUjgfS7g.mjs +95 -0
  31. package/chunks/DWLv8UUC.mjs +612 -0
  32. package/chunks/Ds_Tpa_M.mjs +83 -0
  33. package/chunks/MeM8FGzA.mjs +200 -0
  34. package/chunks/_90XRi0U.mjs +105 -0
  35. package/chunks/_Uzl3uMy.mjs +109 -0
  36. package/chunks/b5HOxD60.mjs +1369 -0
  37. package/chunks/cmuHpsX6.mjs +109 -0
  38. package/chunks/ePSxkHli.mjs +95 -0
  39. package/chunks/jHrYQI1Q.mjs +320 -0
  40. package/chunks/kKoMKOYH.mjs +180 -0
  41. package/chunks/lPLJkGiz.mjs +25 -0
  42. package/chunks/mbLUSXcZ.mjs +56 -0
  43. package/chunks/y-DmM31a.mjs +168 -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 +459 -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 +232 -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,462 @@
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/CybmpSN8.mjs";
5
+ import { t as o } from "../chunks/B1MSrc6f.mjs";
6
+ import { a as s } from "../chunks/CXSIP67a.mjs";
7
+ import c from "../form-item-config-provider/index.mjs";
8
+ import { t as l } from "../chunks/DWLv8UUC.mjs";
9
+ import { t as u } from "../chunks/DMcUruCK2.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";
14
+ import "element-plus/es/components/base/style/css";
15
+ import "element-plus/es/components/button/style/css";
16
+ import "element-plus/es/components/form-item/style/css";
17
+ import "element-plus/es/components/row/style/css";
18
+ import "element-plus/es/components/form/style/css";
19
+ import "element-plus/es/components/collapse-transition/style/css";
1
20
  //#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;
21
+ var W = [
22
+ "back",
23
+ "create",
24
+ "save",
25
+ "withdraw",
26
+ "edit",
27
+ "submit",
28
+ "publish",
29
+ "agree",
30
+ "disagree",
31
+ "reject",
32
+ "finish",
33
+ "cancel",
34
+ "enable",
35
+ "exp",
36
+ "imp",
37
+ "del",
38
+ "disabled",
39
+ "reload",
40
+ "slot"
41
+ ], G = {
42
+ name: "TableView",
43
+ bus: {
44
+ reloadTableView(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)) && (g.call(this.$parent || {}, "reloadTableView"), this.reloadTable());
48
+ } else _.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
49
+ },
50
+ reloadTreeView(e) {
51
+ if (this._viewIds) if (m(e) || f(e)) {
52
+ let t = e;
53
+ m(t) && (t = t.split(",")), this._viewIds.some((e) => t.includes(e)) && this.$refs.tree && (g.call(this.$parent || {}, "reloadTreeView"), this.reloadTree());
54
+ } else _.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
55
+ }
56
+ },
57
+ provide() {
58
+ return { [i]: this };
59
+ },
60
+ props: {
61
+ viewId: [String, Array],
62
+ searchPanelAttrs: {
63
+ type: Object,
64
+ default: () => {}
65
+ },
66
+ toolbarAttrs: {
67
+ type: Object,
68
+ default: () => {}
69
+ },
70
+ toolbarListeners: Object,
71
+ treeAttrs: {
72
+ type: Object,
73
+ default: () => {}
74
+ },
75
+ treeListeners: Object,
76
+ tableAttrs: Object,
77
+ searchModel: Object,
78
+ tableListeners: {
79
+ type: Object,
80
+ default: () => {}
81
+ },
82
+ deleteApi: Function,
83
+ borderTop: Boolean,
84
+ borderBottom: Boolean,
85
+ borderLeft: Boolean,
86
+ borderRight: Boolean,
87
+ border: {
88
+ type: Boolean,
89
+ default: !0
90
+ },
91
+ labelWidth: {
92
+ type: String,
93
+ default: "120px"
94
+ },
95
+ formPath: [String, Function],
96
+ searchFormPosition: {
97
+ type: String,
98
+ default: "top"
99
+ },
100
+ embed: Boolean,
101
+ deleteTips: String,
102
+ selectTips: String,
103
+ rowKey: {
104
+ type: String,
105
+ default: "id"
106
+ },
107
+ expandSearch: Boolean,
108
+ showToolbar: {
109
+ type: Boolean,
110
+ default: !0
111
+ }
112
+ },
113
+ emits: ["reset"],
114
+ data() {
115
+ return {
116
+ importDialogVisible: !1,
117
+ selectedRows: [],
118
+ isSearchVisible: !1
119
+ };
120
+ },
121
+ computed: {
122
+ buttonSlots() {
123
+ return W.filter((e) => this.$slots[e]);
124
+ },
125
+ toolbarProps() {
126
+ var e, t;
127
+ let r = R({}, this.toolbarAttrs, {}), i = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
128
+ 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;
129
+ },
130
+ treeProps() {
131
+ return e(R({}, this.treeAttrs, {
132
+ treeProps: {
133
+ children: "children",
134
+ label: "label",
135
+ isLeaf: (e) => d(e, "hasChildren") ? !e.hasChildren : d(e, "hasChild") ? !e.hasChild : !0
136
+ },
137
+ show: !1,
138
+ lazy: !0,
139
+ readonly: !0,
140
+ data: [],
141
+ expandFirstNode: !0,
142
+ defaultExpandAll: !1
143
+ }));
144
+ },
145
+ tableProps() {
146
+ let t = this.tableAttrs.api || this.$parent.getPage, n = {
147
+ model: this.searchModel || {},
148
+ height: "auto",
149
+ highlightCurrentRow: !0,
150
+ api: t
151
+ };
152
+ return e(R({}, this.tableAttrs, n));
153
+ },
154
+ searchPanelProps() {
155
+ let t = {
156
+ width: 350,
157
+ model: this.searchModel || {}
158
+ };
159
+ return e(R({}, this.searchPanelAttrs, t));
160
+ },
161
+ toolbarEventHandlers() {
162
+ if (this.toolbarListeners) {
163
+ let { exp: e, ...t } = this.toolbarListeners;
164
+ return t;
165
+ }
166
+ return {};
167
+ },
168
+ tableScopeSlotNames() {
169
+ var e;
170
+ return ((e = this.tableAttrs) == null || (e = e.columns) == null ? void 0 : e.map((e) => e.prop).filter((e) => this.$slots[e])) ?? [];
171
+ }
172
+ },
173
+ watch: { expandSearch: {
174
+ immediate: !0,
175
+ handler(e) {
176
+ this.isSearchVisible = e;
177
+ }
178
+ } },
179
+ created() {
180
+ this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
181
+ },
182
+ activated() {
183
+ this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
184
+ },
185
+ methods: {
186
+ toHyphenateKey: e,
187
+ onTreeScroll() {
188
+ this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
189
+ },
190
+ toggleSearch() {
191
+ this.isSearchVisible = !this.isSearchVisible;
192
+ },
193
+ onSearchClick() {
194
+ this.reloadTable();
195
+ },
196
+ onClearClick() {
197
+ this.$emit("reset"), this.$refs.form.resetFields(), this.reloadTable();
198
+ },
199
+ openFrom(e) {
200
+ this.$router.push(t(this.formPath, e));
201
+ },
202
+ rowDbClick(e) {
203
+ var t;
204
+ !((t = this.tableListeners) != null && t["row-dblclick"]) && this.formPath && this.openFrom(e);
205
+ },
206
+ onSelectionChange(e) {
207
+ this.selectedRows = e;
208
+ },
209
+ create() {
210
+ var e;
211
+ !((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
212
+ },
213
+ async del() {
214
+ var e;
215
+ let t = this.deleteApi || this.$parent.del;
216
+ if (!((e = this.toolbarListeners) != null && e.del) && p(t)) {
217
+ if (!this.selectedRows.length) {
218
+ this.$message.warning(this.selectTips || "请选择要删除的记录!");
219
+ return;
220
+ }
221
+ await this.$confirm(this.deleteTips || `您确定要删除选中的[<span class="break-word" style="color: orange">${this.selectedRows.length}</span>]行记录吗?`, "系统提示", {
222
+ type: "warning",
223
+ modal: !0,
224
+ dangerouslyUseHTMLString: !0,
225
+ closeOnClickModal: !1,
226
+ beforeClose: async (e, n, i) => {
227
+ if (e === "confirm") try {
228
+ n.confirmButtonLoading = !0, n.confirmButtonText = "删除...";
229
+ let e = await t.call(this, this.selectedRows.map((e) => e[this.rowKey]));
230
+ this.$message.success(e.data.msg || "删除成功"), this.reloadTableAndTree(), r();
231
+ } catch {}
232
+ i();
233
+ }
234
+ }).catch((e) => e);
235
+ }
236
+ },
237
+ reloadTable() {
238
+ var e;
239
+ (e = this.$refs.table) == null || e.reload();
240
+ },
241
+ async refreshTable(e) {
242
+ var t;
243
+ await ((t = this.$refs.table) == null ? void 0 : t.getPage(e));
244
+ },
245
+ reloadTree() {
246
+ var e;
247
+ (e = this.$refs.tree) == null || e.reloadTree();
248
+ },
249
+ reloadTableAndTree() {
250
+ this.reloadTable(), this.reloadTree();
251
+ },
252
+ currentRow() {
253
+ return this.$refs.table.currentRow;
254
+ },
255
+ getPageQuery() {
256
+ return this.$refs.table.getPageQuery();
257
+ },
258
+ exp() {
259
+ var e, t;
260
+ (e = (t = this.toolbarListeners).exp) == null || e.call(t, this.selectedRows);
261
+ },
262
+ getTableColumns() {
263
+ return this.$refs.table.tableColumns;
264
+ }
6
265
  }
7
- });
266
+ }, K = { class: "table-view-wrapper" }, q = {
267
+ key: 0,
268
+ class: "search-form-top"
269
+ }, 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" };
270
+ function $(e, t, n, r, i, o) {
271
+ let d = z, f = s, p = U, m = c, h = V, g = B, _ = u, R = a, W = l, G = H;
272
+ return k(), x("div", { class: D(["table-view", {
273
+ embed: n.embed,
274
+ "has-tree": o.treeProps.show
275
+ }]) }, [S("div", K, [
276
+ b("搜索条件"),
277
+ n.searchFormPosition === "top" ? (k(), y(g, { key: 0 }, {
278
+ default: F(() => [o.toolbarProps.searchable ? I((k(), x("div", q, [T(h, {
279
+ ref: "form",
280
+ "label-position": "right",
281
+ model: n.searchModel || o.searchPanelProps.model,
282
+ "label-width": n.labelWidth,
283
+ onSubmitCapture: L(o.onSearchClick, ["prevent"])
284
+ }, {
285
+ default: F(() => [T(m, { reactive: "" }, {
286
+ default: F(() => [T(p, { gutter: 0 }, {
287
+ default: F(() => [j(e.$slots, "search-form", {}, () => [t[3] || (t[3] = S("p", null, "请添加搜索条件!", -1))]), T(f, {
288
+ class: "search-actions",
289
+ "hide-label": "",
290
+ "fixed-span": 24
291
+ }, {
292
+ default: F(() => [T(d, {
293
+ type: "primary",
294
+ "native-type": "submit"
295
+ }, {
296
+ default: F(() => [...t[4] || (t[4] = [w("开始搜索", -1)])]),
297
+ _: 1
298
+ }), T(d, {
299
+ style: { "margin-left": "10px" },
300
+ onClick: o.onClearClick
301
+ }, {
302
+ default: F(() => [...t[5] || (t[5] = [w("清除条件", -1)])]),
303
+ _: 1
304
+ }, 8, ["onClick"])]),
305
+ _: 1
306
+ })]),
307
+ _: 3
308
+ })]),
309
+ _: 3
310
+ })]),
311
+ _: 3
312
+ }, 8, [
313
+ "model",
314
+ "label-width",
315
+ "onSubmitCapture"
316
+ ])], 512)), [[P, i.isSearchVisible]]) : b("v-if", !0)]),
317
+ _: 3
318
+ })) : b("v-if", !0),
319
+ b("顶部工具条"),
320
+ n.showToolbar ? (k(), y(_, E({ key: 1 }, o.toolbarProps, {
321
+ refreshable: "",
322
+ onSearch: o.toggleSearch,
323
+ onSettings: t[0] || (t[0] = () => e.$refs.table.toggleSettings()),
324
+ onDel: o.del,
325
+ onCreate: o.create,
326
+ onReload: o.reloadTableAndTree,
327
+ onExp: o.exp,
328
+ onImp: t[1] || (t[1] = (e) => i.importDialogVisible = !0)
329
+ }, N(o.toolbarEventHandlers)), C({ _: 2 }, [
330
+ e.$slots["toolbar-button"] ? {
331
+ name: "default",
332
+ fn: F(() => [j(e.$slots, "toolbar-button", { selectedRows: i.selectedRows })]),
333
+ key: "0"
334
+ } : void 0,
335
+ e.$slots["toolbar-left"] ? {
336
+ name: "toolbar-left",
337
+ fn: F(() => [j(e.$slots, "toolbar-left", { selectedRows: i.selectedRows })]),
338
+ key: "1"
339
+ } : void 0,
340
+ e.$slots["toolbar-right"] ? {
341
+ name: "toolbar-right",
342
+ fn: F(() => [j(e.$slots, "toolbar-right", {
343
+ del: o.del,
344
+ create: o.create,
345
+ reload: o.reloadTableAndTree,
346
+ selectedRows: i.selectedRows
347
+ })]),
348
+ key: "2"
349
+ } : void 0,
350
+ e.$slots["toolbar-right-button"] ? {
351
+ name: "toolbar-right-button",
352
+ fn: F(() => [j(e.$slots, "toolbar-right-button")]),
353
+ key: "3"
354
+ } : void 0,
355
+ A(o.buttonSlots, (t) => ({
356
+ name: t,
357
+ fn: F(() => [j(e.$slots, t, { selectedRows: i.selectedRows })])
358
+ }))
359
+ ]), 1040, [
360
+ "onSearch",
361
+ "onDel",
362
+ "onCreate",
363
+ "onReload",
364
+ "onExp"
365
+ ])) : b("v-if", !0),
366
+ S("div", J, [
367
+ S("div", Y, [
368
+ b("侧栏"),
369
+ o.treeProps.show ? (k(), x("div", {
370
+ key: 0,
371
+ ref: "treeScroller",
372
+ class: "table-view-sidebar",
373
+ onScroll: t[2] || (t[2] = (...e) => o.onTreeScroll && o.onTreeScroll(...e))
374
+ }, [b("<div style=\"font-size: 16px\">视图导航</div>"), T(R, E({ ref: "tree" }, o.treeProps, { readonly: "" }, N(o.toHyphenateKey(n.treeListeners))), {
375
+ default: F(({ node: t, data: n }) => [j(e.$slots, "tree-node", {
376
+ node: t,
377
+ data: n
378
+ }, () => [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", {
379
+ node: t,
380
+ data: n
381
+ }, () => [w(M(t.label), 1)])])])]),
382
+ _: 3
383
+ }, 16)], 544)) : b("v-if", !0),
384
+ b("表格"),
385
+ S("div", X, [T(W, E({
386
+ ref: "table",
387
+ border: n.border,
388
+ class: [{
389
+ "border-top": n.borderTop,
390
+ "border-bottom": n.borderBottom,
391
+ "border-left": n.borderLeft || n.treeAttrs && n.treeAttrs.show,
392
+ "border-right": n.borderRight
393
+ }]
394
+ }, o.tableProps, N(o.toHyphenateKey(n.tableListeners)), {
395
+ onRowDblclick: o.rowDbClick,
396
+ onSelectionChange: o.onSelectionChange
397
+ }), C({
398
+ default: F(() => [j(e.$slots, "columns")]),
399
+ _: 2
400
+ }, [A(o.tableScopeSlotNames, (t) => ({
401
+ name: t,
402
+ fn: F(({ row: n }) => [j(e.$slots, t, { row: n })])
403
+ }))]), 1040, [
404
+ "border",
405
+ "class",
406
+ "onRowDblclick",
407
+ "onSelectionChange"
408
+ ])])
409
+ ]),
410
+ b("搜索条件"),
411
+ n.searchFormPosition === "right" ? (k(), y(v, {
412
+ key: 0,
413
+ name: "slide"
414
+ }, {
415
+ default: F(() => [o.toolbarProps.searchable ? I((k(), x("div", {
416
+ key: 0,
417
+ style: O({ width: `${o.searchPanelProps.width}px` }),
418
+ class: "slide-panel"
419
+ }, [b("<div class=\"slide-panel-line\">\n <div class=\"slide-panel-line-indicator\"></div>\n </div>"), S("div", Z, [T(h, {
420
+ ref: "form",
421
+ "label-position": "right",
422
+ model: n.searchModel || o.searchPanelProps.model,
423
+ "label-width": n.labelWidth,
424
+ onSubmitCapture: L(o.onSearchClick, ["prevent"])
425
+ }, {
426
+ default: F(() => [T(m, {
427
+ block: "",
428
+ "wrap-col": !1
429
+ }, {
430
+ default: F(() => [T(p, { gutter: 0 }, {
431
+ default: F(() => [j(e.$slots, "search-form", {}, () => [t[6] || (t[6] = S("p", null, "请添加搜索条件!", -1))])]),
432
+ _: 3
433
+ })]),
434
+ _: 3
435
+ }), T(G, { "label-width": "0" }, {
436
+ default: F(() => [S("div", Q, [T(d, {
437
+ type: "primary",
438
+ "native-type": "submit"
439
+ }, {
440
+ default: F(() => [...t[7] || (t[7] = [w("开始搜索", -1)])]),
441
+ _: 1
442
+ }), T(d, { onClick: o.onClearClick }, {
443
+ default: F(() => [...t[8] || (t[8] = [w("清除条件", -1)])]),
444
+ _: 1
445
+ }, 8, ["onClick"])])]),
446
+ _: 1
447
+ })]),
448
+ _: 3
449
+ }, 8, [
450
+ "model",
451
+ "label-width",
452
+ "onSubmitCapture"
453
+ ])])], 4)), [[P, i.isSearchVisible]]) : b("v-if", !0)]),
454
+ _: 3
455
+ })) : b("v-if", !0)
456
+ ]),
457
+ j(e.$slots, "default")
458
+ ])], 2);
459
+ }
460
+ var ee = /* @__PURE__ */ o(G, [["render", $]]);
8
461
  //#endregion
9
- export { e as default };
462
+ 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/DMcUruCK2.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}