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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -1
  6. package/chunks/6yfBZFOB.mjs +56 -0
  7. package/chunks/B1IPSTA6.mjs +198 -0
  8. package/chunks/B9gA65rt2.mjs +38 -0
  9. package/chunks/BBERmTup.mjs +83 -0
  10. package/chunks/BG8z3V9d2.mjs +643 -0
  11. package/chunks/BQk3-Ppb2.mjs +146 -0
  12. package/chunks/BQyL45PF2.mjs +207 -0
  13. package/chunks/BWh6u1O0.mjs +660 -0
  14. package/chunks/BbSPWDDZ.mjs +100 -0
  15. package/chunks/BfxDxIg0.mjs +106 -0
  16. package/chunks/BqWvBF14.mjs +35 -0
  17. package/chunks/BsZgAJX_2.mjs +81 -0
  18. package/chunks/BtcjAHE6.mjs +317 -0
  19. package/chunks/Bwbtu2cp.mjs +194 -0
  20. package/chunks/ByHz4mmh.mjs +87 -0
  21. package/chunks/C2zgFLYO.mjs +185 -0
  22. package/chunks/C7G-cAoI.mjs +1361 -0
  23. package/chunks/CAd1zK9Q.mjs +25 -0
  24. package/chunks/CJdkjadi.mjs +17 -0
  25. package/chunks/CXsoKP22.mjs +86 -0
  26. package/chunks/CabldOLo.mjs +157 -0
  27. package/chunks/CkOD-_VV.mjs +8 -0
  28. package/chunks/CqVd8D222.mjs +89 -0
  29. package/chunks/CuAoMR3n.mjs +105 -0
  30. package/chunks/DA7oGHSX.mjs +141 -0
  31. package/chunks/DKwp6AMl.mjs +168 -0
  32. package/chunks/DOP3aBxf.mjs +93 -0
  33. package/chunks/DOZRzqlo.mjs +37 -0
  34. package/chunks/D_Fs3bkZ.mjs +57 -0
  35. package/chunks/D_qiRmiE.mjs +230 -0
  36. package/chunks/DcTVYqeJ.mjs +113 -0
  37. package/chunks/Dt3lfDnL.mjs +166 -0
  38. package/chunks/GI8krYU82.mjs +478 -0
  39. package/chunks/V2p-PCpL.mjs +176 -0
  40. package/chunks/YFiU0ngn.mjs +622 -0
  41. package/chunks/bFbPPcdq.mjs +25 -0
  42. package/chunks/eae6huQB.mjs +25 -0
  43. package/chunks/gCeDFHo1.mjs +32 -0
  44. package/chunks/gLPy4Sus.mjs +164 -0
  45. package/chunks/hlha6Bhc.mjs +107 -0
  46. package/chunks/pIzhYsBe.mjs +93 -0
  47. package/chunks/wDS9KBFw.mjs +67 -0
  48. package/chunks/wXeqV-_7.mjs +89 -0
  49. package/confirm-button/index.d.ts +122 -0
  50. package/confirm-button/index.mjs +35 -0
  51. package/confirmable/index.d.ts +93 -0
  52. package/confirmable/index.mjs +8 -0
  53. package/constants/index.d.ts +54 -0
  54. package/constants/index.mjs +4 -0
  55. package/dict-render/index.d.ts +28 -0
  56. package/dict-render/index.mjs +2 -0
  57. package/editable-tree/index.d.ts +254 -0
  58. package/editable-tree/index.mjs +2 -0
  59. package/editable-tree/style.css +1 -0
  60. package/element-dialog/index.d.ts +337 -16
  61. package/element-dialog/index.mjs +2 -91
  62. package/element-resize-observer/index.d.ts +8 -0
  63. package/element-resize-observer/index.mjs +40 -0
  64. package/element-resize-observer/style.css +1 -0
  65. package/empty-view/index.d.ts +2 -2
  66. package/empty-view/index.mjs +1 -1
  67. package/flex-scroll-area/index.d.ts +1 -1
  68. package/flex-scroll-area/index.mjs +1 -1
  69. package/form-advice/index.mjs +13 -12
  70. package/form-button/index.d.ts +123 -0
  71. package/form-button/index.mjs +36 -0
  72. package/form-card/index.d.ts +14 -0
  73. package/form-card/index.mjs +18 -0
  74. package/form-cascader/index.d.ts +472 -0
  75. package/form-cascader/index.mjs +2 -0
  76. package/form-checkbox/index.d.ts +236 -16
  77. package/form-checkbox/index.mjs +1 -1
  78. package/form-checkbox-group/index.d.ts +364 -0
  79. package/form-checkbox-group/index.mjs +2 -0
  80. package/form-checkbox-group/style.css +1 -0
  81. package/form-date-picker/index.d.ts +390 -19
  82. package/form-date-picker/index.mjs +1 -1
  83. package/form-holder/index.d.ts +87 -20
  84. package/form-holder/index.mjs +1 -1
  85. package/form-holder/style.css +1 -1
  86. package/form-image/index.d.ts +145 -13
  87. package/form-image/index.mjs +1 -1
  88. package/form-input/index.d.ts +301 -20
  89. package/form-input/index.mjs +1 -1
  90. package/form-input/style.css +1 -0
  91. package/form-input-cron-expression/index.d.ts +217 -0
  92. package/form-input-cron-expression/index.mjs +2 -0
  93. package/form-input-cron-expression/style.css +1 -0
  94. package/form-input-email/index.d.ts +307 -16
  95. package/form-input-email/index.mjs +1 -1
  96. package/form-input-id-card/index.d.ts +307 -16
  97. package/form-input-id-card/index.mjs +1 -1
  98. package/form-input-number/index.d.ts +246 -18
  99. package/form-input-number/index.mjs +1 -1
  100. package/form-input-phone-number/index.d.ts +307 -16
  101. package/form-input-phone-number/index.mjs +1 -1
  102. package/form-input-tag/index.d.ts +263 -1
  103. package/form-input-tag/index.mjs +1 -3
  104. package/form-input-time/index.d.ts +434 -1
  105. package/form-input-time/index.mjs +1 -3
  106. package/form-item-config-provider/index.d.ts +22 -0
  107. package/form-item-config-provider/index.mjs +24 -0
  108. package/form-item-group/index.d.ts +91 -17
  109. package/form-item-group/index.mjs +2 -78
  110. package/form-item-group/style.css +1 -1
  111. package/form-item-x/index.d.ts +141 -11
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-item-x/style.css +1 -0
  114. package/form-radio-group/index.d.ts +303 -16
  115. package/form-radio-group/index.mjs +1 -1
  116. package/form-rate/index.d.ts +254 -14
  117. package/form-rate/index.mjs +1 -1
  118. package/form-red-table/index.mjs +27 -26
  119. package/form-row/index.d.ts +2 -2
  120. package/form-row/index.mjs +1 -1
  121. package/form-select/index.d.ts +537 -18
  122. package/form-select/index.mjs +1 -1
  123. package/form-slider/index.d.ts +283 -16
  124. package/form-slider/index.mjs +1 -1
  125. package/form-switch/index.d.ts +272 -14
  126. package/form-switch/index.mjs +1 -1
  127. package/form-table/index.d.ts +269 -0
  128. package/form-table/index.mjs +2 -0
  129. package/form-table-plus/index.d.ts +266 -0
  130. package/form-table-plus/index.mjs +2 -0
  131. package/form-text/index.d.ts +165 -13
  132. package/form-text/index.mjs +1 -1
  133. package/form-textarea/index.d.ts +351 -0
  134. package/form-textarea/index.mjs +2 -0
  135. package/form-time-select/index.d.ts +319 -0
  136. package/form-time-select/index.mjs +2 -0
  137. package/form-view/index.mjs +1 -1
  138. package/helper/dictionary.d.ts +15 -0
  139. package/helper/dictionary.mjs +97 -0
  140. package/hook/useDictionary.d.ts +60 -0
  141. package/hook/useDictionary.mjs +15 -0
  142. package/hook/useVisibilityChange.d.ts +4 -0
  143. package/hook/useVisibilityChange.mjs +14 -0
  144. package/iframe-window/index.d.ts +9 -0
  145. package/iframe-window/index.mjs +37 -0
  146. package/iframe-window/style.css +1 -0
  147. package/index.css +2 -0
  148. package/index.d.ts +57 -36
  149. package/index.mjs +59 -61
  150. package/package.json +10 -5
  151. package/pageable-table/index.d.ts +400 -0
  152. package/pageable-table/index.mjs +2 -0
  153. package/pageable-table/style.css +1 -0
  154. package/resolver/index.mjs +29 -0
  155. package/sub-table/index.d.ts +100 -0
  156. package/sub-table/index.mjs +537 -0
  157. package/sub-table/style.css +1 -0
  158. package/sub-table-plus/index.d.ts +100 -0
  159. package/sub-table-plus/index.mjs +2 -0
  160. package/sub-table-plus/style.css +1 -0
  161. package/table-column/index.d.ts +160 -0
  162. package/table-column/index.mjs +2 -0
  163. package/table-column/style.css +1 -0
  164. package/table-column-def/index.d.ts +95 -0
  165. package/table-column-def/index.mjs +11 -0
  166. package/table-view/index.d.ts +341 -1
  167. package/table-view/index.mjs +457 -6
  168. package/table-view/style.css +1 -0
  169. package/toolbar/index.d.ts +128 -1
  170. package/toolbar/index.mjs +1 -8
  171. package/toolbar/style.css +1 -0
  172. package/toolbar-button/index.d.ts +188 -1
  173. package/toolbar-button/index.mjs +1 -8
  174. package/vue-cron/index.d.ts +191 -0
  175. package/vue-cron/index.mjs +2 -0
  176. package/vue-cron/style.css +1 -0
  177. package/web-types.json +1 -1
  178. package/x-input-tag/index.d.ts +2 -0
  179. package/x-input-tag/index.mjs +228 -0
  180. package/x-input-tag/style.css +1 -0
  181. package/year-calendar/index.d.ts +99 -0
  182. package/year-calendar/index.mjs +2 -0
  183. package/year-calendar/style.css +1 -0
  184. package/chunks/B4M_TFeR.mjs +0 -152
  185. package/chunks/B5BIQCcK.mjs +0 -149
  186. package/chunks/BHNKrW1j.mjs +0 -61
  187. package/chunks/BO9jWhBl.mjs +0 -46
  188. package/chunks/BZ8aOa78.mjs +0 -35
  189. package/chunks/Bsz7y4Xp.mjs +0 -73
  190. package/chunks/Bxj372sF.mjs +0 -53
  191. package/chunks/C33EmJN8.mjs +0 -32
  192. package/chunks/C6Li3-l7.mjs +0 -28
  193. package/chunks/CBcdalMX.mjs +0 -35
  194. package/chunks/CdRsyF0n.mjs +0 -43
  195. package/chunks/ClNahmiU.mjs +0 -23
  196. package/chunks/CstztYMu.mjs +0 -28
  197. package/chunks/DC9b53M6.mjs +0 -32
  198. package/chunks/DDVAgRED.mjs +0 -36
  199. package/chunks/DpJQABVD.mjs +0 -91
  200. package/chunks/ZsLNWI9x.mjs +0 -46
  201. package/chunks/jn_iQrVZ.mjs +0 -28
  202. package/constants.d.ts +0 -1
  203. package/constants.mjs +0 -4
  204. package/form-check-box-group/index.d.ts +0 -93
  205. package/form-check-box-group/index.mjs +0 -2
  206. package/input/style.css +0 -1
  207. package/resolver.mjs +0 -79
  208. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -1,9 +1,460 @@
1
+ import { i as e, l as t } from "../chunks/DcTVYqeJ.mjs";
2
+ import { processButtons as n, reloadTable as r } from "../api/index.mjs";
3
+ import { cellClickHandlerContextKey as i, tableViewContextKey as a } from "../constants/index.mjs";
4
+ import { t as o } from "../chunks/Dt3lfDnL.mjs";
5
+ import { t as s } from "../chunks/BWh6u1O0.mjs";
6
+ import { t as c } from "../chunks/CkOD-_VV.mjs";
7
+ import { a as l } from "../chunks/D_qiRmiE.mjs";
8
+ import u from "../form-item-config-provider/index.mjs";
9
+ import { t as d } from "../chunks/YFiU0ngn.mjs";
10
+ import { t as f } from "../chunks/BQyL45PF2.mjs";
11
+ import { hasOwn as p, isArray as m, isFunction as h, isString as g, toStringArray as _, trace as v, warning as y } from "@web-utils/core";
12
+ import { Transition as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, mergeProps as O, normalizeClass as k, normalizeStyle as A, openBlock as j, renderList as M, renderSlot as N, toDisplayString as P, toHandlers as F, vShow as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
13
+ import { merge as B } from "@web-utils/integrations/lodash";
14
+ import { ElCollapseTransition as V, ElForm as H, ElFormItem as U, ElRow as W } from "element-plus/es";
1
15
  //#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;
16
+ var G = [
17
+ "back",
18
+ "create",
19
+ "save",
20
+ "withdraw",
21
+ "edit",
22
+ "submit",
23
+ "publish",
24
+ "agree",
25
+ "disagree",
26
+ "reject",
27
+ "finish",
28
+ "cancel",
29
+ "enable",
30
+ "exp",
31
+ "imp",
32
+ "del",
33
+ "disabled",
34
+ "reload",
35
+ "slot"
36
+ ], K = {
37
+ name: "TableView",
38
+ bus: {
39
+ reloadTableView(e) {
40
+ if (this._viewIds) if (g(e) || m(e)) {
41
+ let t = e;
42
+ g(t) && (t = t.split(",")), this._viewIds.some((e) => t.includes(e)) && (v.call(this.$parent || {}, "reloadTableView"), this.reloadTable());
43
+ } else y.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
44
+ },
45
+ reloadTreeView(e) {
46
+ if (this._viewIds) if (g(e) || m(e)) {
47
+ let t = e;
48
+ g(t) && (t = t.split(",")), this._viewIds.some((e) => t.includes(e)) && this.$refs.tree && (v.call(this.$parent || {}, "reloadTreeView"), this.reloadTree());
49
+ } else y.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
50
+ }
51
+ },
52
+ provide() {
53
+ return {
54
+ [a]: this,
55
+ [i]: this.rowDbClick
56
+ };
57
+ },
58
+ props: {
59
+ viewId: [String, Array],
60
+ searchPanelAttrs: {
61
+ type: Object,
62
+ default: () => {}
63
+ },
64
+ toolbarAttrs: {
65
+ type: Object,
66
+ default: () => {}
67
+ },
68
+ toolbarListeners: Object,
69
+ treeAttrs: {
70
+ type: Object,
71
+ default: () => {}
72
+ },
73
+ treeListeners: Object,
74
+ tableAttrs: Object,
75
+ searchModel: Object,
76
+ tableListeners: {
77
+ type: Object,
78
+ default: () => {}
79
+ },
80
+ deleteApi: Function,
81
+ borderTop: Boolean,
82
+ borderBottom: Boolean,
83
+ borderLeft: Boolean,
84
+ borderRight: Boolean,
85
+ border: {
86
+ type: Boolean,
87
+ default: !0
88
+ },
89
+ labelWidth: {
90
+ type: String,
91
+ default: "120px"
92
+ },
93
+ formPath: [String, Function],
94
+ searchFormPosition: {
95
+ type: String,
96
+ default: "top"
97
+ },
98
+ embed: Boolean,
99
+ deleteTips: String,
100
+ selectTips: String,
101
+ rowKey: {
102
+ type: String,
103
+ default: "id"
104
+ },
105
+ expandSearch: Boolean,
106
+ showToolbar: {
107
+ type: Boolean,
108
+ default: !0
109
+ }
110
+ },
111
+ emits: ["reset"],
112
+ data() {
113
+ return {
114
+ importDialogVisible: !1,
115
+ selectedRows: [],
116
+ isSearchVisible: !1
117
+ };
118
+ },
119
+ computed: {
120
+ buttonSlots() {
121
+ return G.filter((e) => this.$slots[e]);
122
+ },
123
+ toolbarProps() {
124
+ var e, t;
125
+ let r = B({}, this.toolbarAttrs, {}), i = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
126
+ return i = i || [], r.buttons = i, r.buttons = n(r.buttons), r.buttons = _(r.buttons), r.searchable = !!((e = (t = this.$slots)["search-form"]) != null && e.call(t)), r;
127
+ },
128
+ treeProps() {
129
+ return t(B({}, this.treeAttrs, {
130
+ treeProps: {
131
+ children: "children",
132
+ label: "label",
133
+ isLeaf: (e) => p(e, "hasChildren") ? !e.hasChildren : p(e, "hasChild") ? !e.hasChild : !0
134
+ },
135
+ show: !1,
136
+ lazy: !0,
137
+ readonly: !0,
138
+ data: [],
139
+ expandFirstNode: !0,
140
+ defaultExpandAll: !1
141
+ }));
142
+ },
143
+ tableProps() {
144
+ let e = this.tableAttrs.api || this.$parent.getPage, n = {
145
+ model: this.searchModel || {},
146
+ height: "auto",
147
+ highlightCurrentRow: !0,
148
+ api: e
149
+ };
150
+ return t(B({}, this.tableAttrs, n));
151
+ },
152
+ searchPanelProps() {
153
+ let e = {
154
+ width: 350,
155
+ model: this.searchModel || {}
156
+ };
157
+ return t(B({}, this.searchPanelAttrs, e));
158
+ },
159
+ toolbarEventHandlers() {
160
+ if (this.toolbarListeners) {
161
+ let { exp: e, ...t } = this.toolbarListeners;
162
+ return t;
163
+ }
164
+ return {};
165
+ },
166
+ tableScopeSlotNames() {
167
+ var e;
168
+ return ((e = this.tableAttrs) == null || (e = e.columns) == null ? void 0 : e.map((e) => e.prop).filter((e) => this.$slots[e])) ?? [];
169
+ }
170
+ },
171
+ watch: { expandSearch: {
172
+ immediate: !0,
173
+ handler(e) {
174
+ this.isSearchVisible = e;
175
+ }
176
+ } },
177
+ created() {
178
+ this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
179
+ },
180
+ activated() {
181
+ this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
182
+ },
183
+ methods: {
184
+ toHyphenateKey: t,
185
+ onTreeScroll() {
186
+ this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
187
+ },
188
+ toggleSearch() {
189
+ this.isSearchVisible = !this.isSearchVisible;
190
+ },
191
+ onSearchClick() {
192
+ this.reloadTable();
193
+ },
194
+ onClearClick() {
195
+ this.$emit("reset"), this.$refs.form.resetFields(), this.reloadTable();
196
+ },
197
+ openFrom(t) {
198
+ this.$router.push(e(this.formPath, t));
199
+ },
200
+ rowDbClick(e) {
201
+ var t;
202
+ !((t = this.tableListeners) != null && t["row-dblclick"]) && this.formPath && this.openFrom(e);
203
+ },
204
+ onSelectionChange(e) {
205
+ this.selectedRows = e;
206
+ },
207
+ create() {
208
+ var e;
209
+ !((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
210
+ },
211
+ async del() {
212
+ var e;
213
+ let t = this.deleteApi || this.$parent.del;
214
+ if (!((e = this.toolbarListeners) != null && e.del) && h(t)) {
215
+ if (!this.selectedRows.length) {
216
+ this.$message.warning(this.selectTips || "请选择要删除的记录!");
217
+ return;
218
+ }
219
+ await this.$confirm(this.deleteTips || `您确定要删除选中的[<span class="break-word" style="color: orange">${this.selectedRows.length}</span>]行记录吗?`, "系统提示", {
220
+ type: "warning",
221
+ modal: !0,
222
+ dangerouslyUseHTMLString: !0,
223
+ closeOnClickModal: !1,
224
+ beforeClose: async (e, n, i) => {
225
+ if (e === "confirm") try {
226
+ n.confirmButtonLoading = !0, n.confirmButtonText = "删除...";
227
+ let e = await t.call(this, this.selectedRows.map((e) => e[this.rowKey]));
228
+ this.$message.success(e.data.msg || "删除成功"), this.reloadTableAndTree(), r();
229
+ } catch {}
230
+ i();
231
+ }
232
+ }).catch((e) => e);
233
+ }
234
+ },
235
+ reloadTable() {
236
+ var e;
237
+ (e = this.$refs.table) == null || e.reload();
238
+ },
239
+ async refreshTable(e) {
240
+ var t;
241
+ await ((t = this.$refs.table) == null ? void 0 : t.getPage(e));
242
+ },
243
+ reloadTree() {
244
+ var e;
245
+ (e = this.$refs.tree) == null || e.reloadTree();
246
+ },
247
+ reloadTableAndTree() {
248
+ this.reloadTable(), this.reloadTree();
249
+ },
250
+ currentRow() {
251
+ return this.$refs.table.currentRow;
252
+ },
253
+ getPageQuery() {
254
+ return this.$refs.table.getPageQuery();
255
+ },
256
+ exp() {
257
+ var e, t;
258
+ (e = (t = this.toolbarListeners).exp) == null || e.call(t, this.selectedRows);
259
+ },
260
+ getTableColumns() {
261
+ return this.$refs.table.tableColumns;
262
+ }
6
263
  }
7
- });
264
+ }, q = { class: "table-view-wrapper" }, J = {
265
+ key: 0,
266
+ class: "search-form-top"
267
+ }, Y = { class: "table-view-content-wrapper" }, X = { class: "table-view-content" }, Z = { class: "table-view-table" }, Q = { class: "slide-panel-content" }, $ = { class: "slide-panel-actions" };
268
+ function ee(e, t, n, r, i, a) {
269
+ let c = o, p = l, m = W, h = u, g = H, _ = V, v = f, y = s, B = d, G = U;
270
+ return j(), C("div", { class: k(["table-view", {
271
+ embed: n.embed,
272
+ "has-tree": a.treeProps.show
273
+ }]) }, [w("div", q, [
274
+ S("搜索条件"),
275
+ n.searchFormPosition === "top" ? (j(), x(_, { key: 0 }, {
276
+ default: L(() => [a.toolbarProps.searchable ? R((j(), C("div", J, [D(g, {
277
+ ref: "form",
278
+ "label-position": "right",
279
+ model: n.searchModel || a.searchPanelProps.model,
280
+ "label-width": n.labelWidth,
281
+ onSubmitCapture: z(a.onSearchClick, ["prevent"])
282
+ }, {
283
+ default: L(() => [D(h, { reactive: "" }, {
284
+ default: L(() => [D(m, { gutter: 0 }, {
285
+ default: L(() => [N(e.$slots, "search-form", {}, () => [t[3] || (t[3] = w("p", null, "请添加搜索条件!", -1))]), D(p, {
286
+ class: "search-actions",
287
+ "hide-label": "",
288
+ "fixed-span": 24
289
+ }, {
290
+ default: L(() => [D(c, {
291
+ type: "primary",
292
+ "native-type": "submit"
293
+ }, {
294
+ default: L(() => [...t[4] || (t[4] = [E("开始搜索", -1)])]),
295
+ _: 1
296
+ }), D(c, {
297
+ style: { "margin-left": "10px" },
298
+ onClick: a.onClearClick
299
+ }, {
300
+ default: L(() => [...t[5] || (t[5] = [E("清除条件", -1)])]),
301
+ _: 1
302
+ }, 8, ["onClick"])]),
303
+ _: 1
304
+ })]),
305
+ _: 3
306
+ })]),
307
+ _: 3
308
+ })]),
309
+ _: 3
310
+ }, 8, [
311
+ "model",
312
+ "label-width",
313
+ "onSubmitCapture"
314
+ ])], 512)), [[I, i.isSearchVisible]]) : S("v-if", !0)]),
315
+ _: 3
316
+ })) : S("v-if", !0),
317
+ S("顶部工具条"),
318
+ n.showToolbar ? (j(), x(v, O({ key: 1 }, a.toolbarProps, {
319
+ refreshable: "",
320
+ onSearch: a.toggleSearch,
321
+ onSettings: t[0] || (t[0] = () => e.$refs.table.toggleSettings()),
322
+ onDel: a.del,
323
+ onCreate: a.create,
324
+ onReload: a.reloadTableAndTree,
325
+ onExp: a.exp,
326
+ onImp: t[1] || (t[1] = (e) => i.importDialogVisible = !0)
327
+ }, F(a.toolbarEventHandlers)), T({ _: 2 }, [
328
+ e.$slots["toolbar-button"] ? {
329
+ name: "default",
330
+ fn: L(() => [N(e.$slots, "toolbar-button", { selectedRows: i.selectedRows })]),
331
+ key: "0"
332
+ } : void 0,
333
+ e.$slots["toolbar-left"] ? {
334
+ name: "toolbar-left",
335
+ fn: L(() => [N(e.$slots, "toolbar-left", { selectedRows: i.selectedRows })]),
336
+ key: "1"
337
+ } : void 0,
338
+ e.$slots["toolbar-right"] ? {
339
+ name: "toolbar-right",
340
+ fn: L(() => [N(e.$slots, "toolbar-right", {
341
+ del: a.del,
342
+ create: a.create,
343
+ reload: a.reloadTableAndTree,
344
+ selectedRows: i.selectedRows
345
+ })]),
346
+ key: "2"
347
+ } : void 0,
348
+ e.$slots["toolbar-right-button"] ? {
349
+ name: "toolbar-right-button",
350
+ fn: L(() => [N(e.$slots, "toolbar-right-button")]),
351
+ key: "3"
352
+ } : void 0,
353
+ M(a.buttonSlots, (t) => ({
354
+ name: t,
355
+ fn: L(() => [N(e.$slots, t, { selectedRows: i.selectedRows })])
356
+ }))
357
+ ]), 1040, [
358
+ "onSearch",
359
+ "onDel",
360
+ "onCreate",
361
+ "onReload",
362
+ "onExp"
363
+ ])) : S("v-if", !0),
364
+ w("div", Y, [
365
+ w("div", X, [
366
+ S("侧栏"),
367
+ a.treeProps.show ? (j(), C("div", {
368
+ key: 0,
369
+ ref: "treeScroller",
370
+ class: "table-view-sidebar",
371
+ onScroll: t[2] || (t[2] = (...e) => a.onTreeScroll && a.onTreeScroll(...e))
372
+ }, [S("<div style=\"font-size: 16px\">视图导航</div>"), D(y, O({ ref: "tree" }, a.treeProps, { readonly: "" }, F(a.toHyphenateKey(n.treeListeners))), {
373
+ default: L(({ node: t, data: n }) => [N(e.$slots, "tree-node", {
374
+ node: t,
375
+ data: n
376
+ }, () => [w("span", null, [w("i", { class: k([t.childNodes.length > 0 ? t.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets", "node-icon"]) }, null, 2), N(e.$slots, "tree-label", {
377
+ node: t,
378
+ data: n
379
+ }, () => [E(P(t.label), 1)])])])]),
380
+ _: 3
381
+ }, 16)], 544)) : S("v-if", !0),
382
+ S("表格"),
383
+ w("div", Z, [D(B, O({
384
+ ref: "table",
385
+ border: n.border,
386
+ class: [{
387
+ "border-top": n.borderTop,
388
+ "border-bottom": n.borderBottom,
389
+ "border-left": n.borderLeft || n.treeAttrs && n.treeAttrs.show,
390
+ "border-right": n.borderRight
391
+ }]
392
+ }, a.tableProps, F(a.toHyphenateKey(n.tableListeners)), {
393
+ onRowDblclick: a.rowDbClick,
394
+ onSelectionChange: a.onSelectionChange
395
+ }), T({
396
+ default: L(() => [N(e.$slots, "columns")]),
397
+ _: 2
398
+ }, [M(a.tableScopeSlotNames, (t) => ({
399
+ name: t,
400
+ fn: L(({ row: n }) => [N(e.$slots, t, { row: n })])
401
+ }))]), 1040, [
402
+ "border",
403
+ "class",
404
+ "onRowDblclick",
405
+ "onSelectionChange"
406
+ ])])
407
+ ]),
408
+ S("搜索条件"),
409
+ n.searchFormPosition === "right" ? (j(), x(b, {
410
+ key: 0,
411
+ name: "slide"
412
+ }, {
413
+ default: L(() => [a.toolbarProps.searchable ? R((j(), C("div", {
414
+ key: 0,
415
+ style: A({ width: `${a.searchPanelProps.width}px` }),
416
+ class: "slide-panel"
417
+ }, [S("<div class=\"slide-panel-line\">\n <div class=\"slide-panel-line-indicator\"></div>\n </div>"), w("div", Q, [D(g, {
418
+ ref: "form",
419
+ "label-position": "right",
420
+ model: n.searchModel || a.searchPanelProps.model,
421
+ "label-width": n.labelWidth,
422
+ onSubmitCapture: z(a.onSearchClick, ["prevent"])
423
+ }, {
424
+ default: L(() => [D(h, {
425
+ block: "",
426
+ "wrap-col": !1
427
+ }, {
428
+ default: L(() => [D(m, { gutter: 0 }, {
429
+ default: L(() => [N(e.$slots, "search-form", {}, () => [t[6] || (t[6] = w("p", null, "请添加搜索条件!", -1))])]),
430
+ _: 3
431
+ })]),
432
+ _: 3
433
+ }), D(G, { "label-width": "0" }, {
434
+ default: L(() => [w("div", $, [D(c, {
435
+ type: "primary",
436
+ "native-type": "submit"
437
+ }, {
438
+ default: L(() => [...t[7] || (t[7] = [E("开始搜索", -1)])]),
439
+ _: 1
440
+ }), D(c, { onClick: a.onClearClick }, {
441
+ default: L(() => [...t[8] || (t[8] = [E("清除条件", -1)])]),
442
+ _: 1
443
+ }, 8, ["onClick"])])]),
444
+ _: 1
445
+ })]),
446
+ _: 3
447
+ }, 8, [
448
+ "model",
449
+ "label-width",
450
+ "onSubmitCapture"
451
+ ])])], 4)), [[I, i.isSearchVisible]]) : S("v-if", !0)]),
452
+ _: 3
453
+ })) : S("v-if", !0)
454
+ ]),
455
+ N(e.$slots, "default")
456
+ ])], 2);
457
+ }
458
+ var te = /* @__PURE__ */ c(K, [["render", ee]]);
8
459
  //#endregion
9
- export { e as default };
460
+ export { te 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/BQyL45PF2.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}