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

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