@web-utils/component 2.0.10 → 2.0.12

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 (172) hide show
  1. package/dist/chunks/3d28cc08.js +57 -0
  2. package/dist/chunks/{41a066be.js → 44b78389.js} +8 -8
  3. package/dist/chunks/5d33812d.js +147 -0
  4. package/dist/chunks/{61ad06b2.js → 822300f3.js} +3 -3
  5. package/dist/chunks/9d848bf6.js +99 -0
  6. package/dist/chunks/a0bb327b.js +96 -0
  7. package/dist/chunks/a8891d2c.js +30 -0
  8. package/dist/chunks/c69d5628.js +248 -0
  9. package/dist/chunks/de9fe802.js +24 -0
  10. package/dist/chunks/{5a78e0db.js → e1939731.js} +6 -5
  11. package/dist/components/address-input/index.js +56 -43
  12. package/dist/components/address-input/style.css +15 -1
  13. package/dist/components/aside-menu/index.js +36 -30
  14. package/dist/components/aside-menu/style.css +9 -1
  15. package/dist/components/awesome-button/index.js +35 -32
  16. package/dist/components/base.css +66 -1
  17. package/dist/components/capsule-tab/index.js +33 -27
  18. package/dist/components/capsule-tab/style.css +32 -1
  19. package/dist/components/chunk-file-uploader/index.js +88 -54
  20. package/dist/components/chunk-file-uploader/style.css +4 -1
  21. package/dist/components/chunk-file-uploader-button/index.js +31 -25
  22. package/dist/components/chunk-file-uploader-button/style.css +17 -1
  23. package/dist/components/chunk-file-uploader-drop/index.js +42 -28
  24. package/dist/components/chunk-file-uploader-drop/style.css +12 -1
  25. package/dist/components/chunk-file-uploader-file/index.js +212 -134
  26. package/dist/components/chunk-file-uploader-file/style.css +125 -1
  27. package/dist/components/chunk-file-uploader-files/index.js +34 -28
  28. package/dist/components/chunk-file-uploader-files/style.css +9 -1
  29. package/dist/components/chunk-file-uploader-list/index.js +35 -29
  30. package/dist/components/chunk-file-uploader-list/style.css +9 -1
  31. package/dist/components/chunk-file-uploader-un-support/index.js +38 -30
  32. package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
  33. package/dist/components/code-mirror-editor/index.js +181 -153
  34. package/dist/components/code-mirror-editor/style.css +17 -1
  35. package/dist/components/color-picker/index.js +68 -49
  36. package/dist/components/confirm-button/index.js +21 -19
  37. package/dist/components/confirmable/index.js +19 -18
  38. package/dist/components/context-menu/index.js +130 -108
  39. package/dist/components/context-menu/style.css +88 -1
  40. package/dist/components/custom-scrollbar/index.js +67 -49
  41. package/dist/components/data-table-picker/index.js +81 -62
  42. package/dist/components/dynamic-table/index.js +113 -89
  43. package/dist/components/dynamic-table/style.css +30 -1
  44. package/dist/components/e-charts/index.js +201 -120
  45. package/dist/components/e-charts/style.css +10 -1
  46. package/dist/components/editable-progress/index.js +93 -60
  47. package/dist/components/editable-progress/style.css +37 -1
  48. package/dist/components/editable-tree/index.js +638 -423
  49. package/dist/components/editable-tree/style.css +82 -1
  50. package/dist/components/egd-collapse/index.js +46 -33
  51. package/dist/components/egd-collapse-item/index.js +76 -60
  52. package/dist/components/element-dialog/index.js +147 -95
  53. package/dist/components/element-dialog/style.css +102 -1
  54. package/dist/components/empty-view/index.js +34 -28
  55. package/dist/components/empty-view/style.css +17 -1
  56. package/dist/components/error-view/index.js +32 -26
  57. package/dist/components/error-view/style.css +17 -1
  58. package/dist/components/flex-column/index.js +40 -25
  59. package/dist/components/flex-item/index.js +57 -29
  60. package/dist/components/flex-row/index.js +40 -25
  61. package/dist/components/flex-scroller/index.js +32 -26
  62. package/dist/components/flex-scroller/style.css +20 -1
  63. package/dist/components/form-button/index.js +38 -34
  64. package/dist/components/form-cascader/index.js +81 -71
  65. package/dist/components/form-checkbox-group/index.js +113 -88
  66. package/dist/components/form-checkbox-group/style.css +51 -1
  67. package/dist/components/form-date-picker/index.js +132 -70
  68. package/dist/components/form-holder/index.js +39 -32
  69. package/dist/components/form-input/index.js +62 -56
  70. package/dist/components/form-input-email/index.js +60 -48
  71. package/dist/components/form-input-id-card/index.js +59 -53
  72. package/dist/components/form-input-number/index.js +68 -61
  73. package/dist/components/form-input-number/style.css +12 -1
  74. package/dist/components/form-input-phone-number/index.js +55 -49
  75. package/dist/components/form-input-time/index.js +59 -53
  76. package/dist/components/form-item/index.js +123 -80
  77. package/dist/components/form-item/style.css +11 -1
  78. package/dist/components/form-item-config-provider/index.js +26 -25
  79. package/dist/components/form-item-group/index.js +111 -85
  80. package/dist/components/form-item-group/style.css +30 -1
  81. package/dist/components/form-radio-group/index.js +104 -85
  82. package/dist/components/form-radio-group/style.css +53 -1
  83. package/dist/components/form-select/index.js +91 -76
  84. package/dist/components/form-switch/index.js +57 -51
  85. package/dist/components/form-textarea/index.js +57 -51
  86. package/dist/components/form-view/index.js +232 -165
  87. package/dist/components/form-view/style.css +158 -1
  88. package/dist/components/guide-steps/index.js +58 -44
  89. package/dist/components/guide-steps/style.css +34 -1
  90. package/dist/components/icon-card/index.js +35 -29
  91. package/dist/components/icon-card/style.css +56 -1
  92. package/dist/components/iframe-window/index.js +35 -29
  93. package/dist/components/iframe-window/style.css +20 -1
  94. package/dist/components/image-viewer/index.js +66 -48
  95. package/dist/components/image-viewer/style.css +21 -1
  96. package/dist/components/input-number/index.js +193 -127
  97. package/dist/components/input-number/style.css +15 -1
  98. package/dist/components/input-number-range/index.js +57 -45
  99. package/dist/components/input-number-range/style.css +12 -1
  100. package/dist/components/j-s-x-component/index.js +4 -4
  101. package/dist/components/keep-view-alive/index.js +120 -73
  102. package/dist/components/loading-view/index.js +32 -26
  103. package/dist/components/loading-view/style.css +17 -1
  104. package/dist/components/nav-bar/index.js +37 -27
  105. package/dist/components/nav-bar/style.css +17 -1
  106. package/dist/components/not-implement/index.js +31 -23
  107. package/dist/components/not-implement/style.css +15 -1
  108. package/dist/components/page/index.js +28 -22
  109. package/dist/components/page/style.css +12 -1
  110. package/dist/components/page-header/index.js +36 -30
  111. package/dist/components/page-header/style.css +14 -1
  112. package/dist/components/page-index/index.js +83 -62
  113. package/dist/components/page-index/style.css +23 -1
  114. package/dist/components/page-index-top/index.js +68 -53
  115. package/dist/components/page-skeleton/index.js +37 -31
  116. package/dist/components/page-skeleton/style.css +23 -1
  117. package/dist/components/page-skeleton-new/index.js +48 -42
  118. package/dist/components/page-skeleton-new/style.css +42 -1
  119. package/dist/components/pageable-table/index.js +253 -186
  120. package/dist/components/pageable-table/style.css +72 -1
  121. package/dist/components/pageable-view/index.js +199 -129
  122. package/dist/components/pageable-view/style.css +69 -1
  123. package/dist/components/photo-swipe/index.js +151 -110
  124. package/dist/components/photo-swipe/style.css +20 -1
  125. package/dist/components/resize-observer/index.js +68 -34
  126. package/dist/components/resize-observer/style.css +31 -1
  127. package/dist/components/search-popover/index.js +211 -153
  128. package/dist/components/search-popover/style.css +93 -1
  129. package/dist/components/sign-panel/index.js +142 -92
  130. package/dist/components/sign-panel/style.css +97 -1
  131. package/dist/components/split-pane/index.js +162 -101
  132. package/dist/components/split-pane/style.css +100 -1
  133. package/dist/components/stateful/index.js +34 -31
  134. package/dist/components/stateful/style.css +33 -1
  135. package/dist/components/static-pageable-table/index.js +44 -37
  136. package/dist/components/static-pageable-table/style.css +9 -1
  137. package/dist/components/swiper/index.js +150 -85
  138. package/dist/components/swiper/style.css +43 -1
  139. package/dist/components/tab/index.js +72 -54
  140. package/dist/components/tab/style.css +122 -1
  141. package/dist/components/tab-item/index.js +35 -30
  142. package/dist/components/table-column/index.js +32 -30
  143. package/dist/components/table-view/index.js +227 -156
  144. package/dist/components/table-view/style.css +95 -1
  145. package/dist/components/tag-render/index.js +58 -44
  146. package/dist/components/tag-render/style.css +33 -1
  147. package/dist/components/tinymce-editor/index.js +95 -79
  148. package/dist/components/tinymce-editor/style.css +43 -1
  149. package/dist/components/tinymce-wrapper/index.js +121 -92
  150. package/dist/components/tinymce-wrapper/style.css +36 -1
  151. package/dist/components/toolbar/index.js +84 -63
  152. package/dist/components/toolbar/style.css +39 -1
  153. package/dist/components/toolbar-button/index.js +48 -41
  154. package/dist/components/toolbar-button/style.css +21 -1
  155. package/dist/components/trigger/index.js +36 -29
  156. package/dist/components/vue-tags-input/index.js +308 -188
  157. package/dist/components/vue-tags-input/style.css +682 -1
  158. package/dist/components/watermark/index.js +37 -25
  159. package/dist/components/watermark/style.css +11 -1
  160. package/dist/components/x-dialog/index.js +93 -67
  161. package/dist/components/x-dialog/style.css +15 -1
  162. package/dist/index.css +1105 -193
  163. package/dist/index.es.js +7242 -4789
  164. package/package.json +2 -2
  165. package/web-types.json +1 -1
  166. package/dist/chunks/3a79781b.js +0 -75
  167. package/dist/chunks/5d4282fb.js +0 -30
  168. package/dist/chunks/76680a03.js +0 -24
  169. package/dist/chunks/8c0142e0.js +0 -81
  170. package/dist/chunks/97652d86.js +0 -26
  171. package/dist/chunks/b4acd3a6.js +0 -126
  172. package/dist/chunks/f71045fc.js +0 -184
@@ -1,161 +1,185 @@
1
- import { isString as o, isArray as d, trace as n, warning as f, merge as i, toStringArray as p, isFunction as u, hasOwn as c } from "@web-utils/core";
2
- import { k as b } from "../../chunks/f71045fc.js";
3
- import { n as m } from "../../chunks/5d4282fb.js";
4
- var _ = function() {
5
- var e = this, r = e.$createElement, t = e._self._c || r;
6
- return t("div", {
1
+ import { isString, isArray, trace, warning, merge, toStringArray, isFunction, hasOwn } from "@web-utils/core";
2
+ import { k as fillPath } from "../../chunks/c69d5628.js";
3
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
4
+ var render = function() {
5
+ var _vm = this;
6
+ var _h = _vm.$createElement;
7
+ var _c = _vm._self._c || _h;
8
+ return _c("div", {
7
9
  staticClass: "table-view"
8
- }, [t("Toolbar", e._g(e._b({
10
+ }, [_c("Toolbar", _vm._g(_vm._b({
9
11
  on: {
10
- search: e.toggleSearch,
11
- del: e.del,
12
- create: e.create,
13
- reload: e.reloadTable,
14
- imp: function(s) {
15
- e.importDialogVisible = !0;
12
+ "search": _vm.toggleSearch,
13
+ "del": _vm.del,
14
+ "create": _vm.create,
15
+ "reload": _vm.reloadTable,
16
+ "imp": function($event) {
17
+ _vm.importDialogVisible = true;
16
18
  }
17
19
  },
18
- scopedSlots: e._u([{
20
+ scopedSlots: _vm._u([{
19
21
  key: "default",
20
22
  fn: function() {
21
- return [e._t("toolbar-button")];
23
+ return [_vm._t("toolbar-button")];
22
24
  },
23
- proxy: !0
24
- }, e._l(e.buttonSlots, function(s) {
25
+ proxy: true
26
+ }, _vm._l(_vm.buttonSlots, function(item) {
25
27
  return {
26
- key: s,
28
+ key: item,
27
29
  fn: function() {
28
- return [e._t(s)];
30
+ return [_vm._t(item)];
29
31
  },
30
- proxy: !0
32
+ proxy: true
31
33
  };
32
- })], null, !0)
33
- }, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", {
34
+ })], null, true)
35
+ }, "Toolbar", _vm.toolbarProps, false), _vm.toolbarListeners)), _c("div", {
34
36
  staticClass: "table-view-content-wrapper"
35
- }, [t("div", {
37
+ }, [_c("div", {
36
38
  staticClass: "table-view-content"
37
- }, [e.treeProps.show ? t("div", {
39
+ }, [_vm.treeProps.show ? _c("div", {
38
40
  ref: "treeScroller",
39
41
  staticClass: "table-view-sidebar",
40
42
  on: {
41
- scroll: e.onTreeScroll
43
+ "scroll": _vm.onTreeScroll
42
44
  }
43
- }, [t("div", {
45
+ }, [_c("div", {
44
46
  staticStyle: {
45
47
  "font-size": "16px"
46
48
  }
47
- }, [e._v(" 视图导航 ")]), t("EditableTree", e._g(e._b({
49
+ }, [_vm._v(" 视图导航 ")]), _c("EditableTree", _vm._g(_vm._b({
48
50
  ref: "tree",
49
51
  attrs: {
50
- readonly: ""
52
+ "readonly": ""
51
53
  },
52
- scopedSlots: e._u([{
54
+ scopedSlots: _vm._u([{
53
55
  key: "default",
54
- fn: function(s) {
55
- var l = s.node, a = s.data;
56
- return [e._t("tree-node", function() {
57
- return [t("span", [t("i", {
56
+ fn: function(_ref) {
57
+ var node = _ref.node, data = _ref.data;
58
+ return [_vm._t("tree-node", function() {
59
+ return [_c("span", [_c("i", {
58
60
  staticClass: "node-icon",
59
- class: l.childNodes.length > 0 ? l.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
60
- }), e._t("tree-label", function() {
61
- return [e._v(e._s(l.label))];
61
+ class: node.childNodes.length > 0 ? node.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
62
+ }), _vm._t("tree-label", function() {
63
+ return [_vm._v(_vm._s(node.label))];
62
64
  }, {
63
- node: l,
64
- data: a
65
+ "node": node,
66
+ "data": data
65
67
  })], 2)];
66
68
  }, {
67
- node: l,
68
- data: a
69
+ "node": node,
70
+ "data": data
69
71
  })];
70
72
  }
71
- }], null, !0)
72
- }, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", {
73
+ }], null, true)
74
+ }, "EditableTree", _vm.treeProps, false), _vm.treeListeners))], 1) : _vm._e(), _c("div", {
73
75
  staticClass: "table-view-table"
74
- }, [t("PageableTable", e._g(e._b({
76
+ }, [_c("PageableTable", _vm._g(_vm._b({
75
77
  ref: "table",
76
78
  class: [{
77
- "border-top": e.borderTop,
78
- "border-bottom": e.borderBottom,
79
- "border-left": e.borderLeft || e.treeAttrs && e.treeAttrs.show,
80
- "border-right": e.borderRight
79
+ "border-top": _vm.borderTop,
80
+ "border-bottom": _vm.borderBottom,
81
+ "border-left": _vm.borderLeft || _vm.treeAttrs && _vm.treeAttrs.show,
82
+ "border-right": _vm.borderRight
81
83
  }],
82
84
  attrs: {
83
- border: e.border
85
+ "border": _vm.border
84
86
  },
85
87
  on: {
86
- "row-dblclick": e.rowDbClick,
87
- "selection-change": e.onSelectionChange
88
+ "row-dblclick": _vm.rowDbClick,
89
+ "selection-change": _vm.onSelectionChange
88
90
  }
89
- }, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", {
91
+ }, "PageableTable", _vm.tableProps, false), _vm.tableListeners), [_vm._t("columns")], 2)], 1)]), _vm.toolbarProps.searchable ? _c("div", {
90
92
  staticClass: "slide-panel",
91
93
  style: {
92
- right: `${e.right}px`,
93
- width: `${e.searchPanelProps.width}px`
94
+ right: `${_vm.right}px`,
95
+ width: `${_vm.searchPanelProps.width}px`
94
96
  }
95
- }, [e._m(0), t("div", {
97
+ }, [_vm._m(0), _c("div", {
96
98
  staticClass: "slide-panel-content"
97
- }, [t("ElForm", {
99
+ }, [_c("ElForm", {
98
100
  ref: "form",
99
101
  attrs: {
100
102
  "label-position": "right",
101
- model: e.searchModel || e.searchPanelProps.model,
102
- size: "mini",
103
- "label-width": e.labelWidth
103
+ "model": _vm.searchModel || _vm.searchPanelProps.model,
104
+ "size": "mini",
105
+ "label-width": _vm.labelWidth
104
106
  },
105
107
  nativeOn: {
106
- "!submit": function(s) {
107
- return s.preventDefault(), e.onSearchClick.apply(null, arguments);
108
+ "!submit": function($event) {
109
+ $event.preventDefault();
110
+ return _vm.onSearchClick.apply(null, arguments);
108
111
  }
109
112
  }
110
- }, [t("FormItemConfigProvider", {
113
+ }, [_c("FormItemConfigProvider", {
111
114
  attrs: {
112
- block: "",
113
- "wrap-col": !1
115
+ "block": "",
116
+ "wrap-col": false
114
117
  }
115
- }, [t("ElRow", {
118
+ }, [_c("ElRow", {
116
119
  attrs: {
117
- gutter: 0
120
+ "gutter": 0
118
121
  }
119
- }, [e._t("search-form", function() {
120
- return [t("p", [e._v("请添加搜索条件!")])];
121
- })], 2)], 1), t("ElFormItem", {
122
+ }, [_vm._t("search-form", function() {
123
+ return [_c("p", [_vm._v("请添加搜索条件!")])];
124
+ })], 2)], 1), _c("ElFormItem", {
122
125
  attrs: {
123
126
  "label-width": "0"
124
127
  }
125
- }, [t("div", {
128
+ }, [_c("div", {
126
129
  staticClass: "slide-panel-actions"
127
- }, [t("ElButton", {
130
+ }, [_c("ElButton", {
128
131
  attrs: {
129
- type: "primary",
132
+ "type": "primary",
130
133
  "native-type": "submit",
131
- size: "mini"
134
+ "size": "mini"
132
135
  }
133
- }, [e._v(" 开始搜索 ")]), t("ElButton", {
136
+ }, [_vm._v(" 开始搜索 ")]), _c("ElButton", {
134
137
  attrs: {
135
- size: "mini"
138
+ "size": "mini"
136
139
  },
137
140
  on: {
138
- click: e.onClearClick
141
+ "click": _vm.onClearClick
139
142
  }
140
- }, [e._v(" 清除条件 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
141
- }, g = [function() {
142
- var e = this, r = e.$createElement, t = e._self._c || r;
143
- return t("div", {
143
+ }, [_vm._v(" 清除条件 ")])], 1)])], 1)], 1)]) : _vm._e()]), _vm._t("default")], 2);
144
+ };
145
+ var staticRenderFns = [function() {
146
+ var _vm = this;
147
+ var _h = _vm.$createElement;
148
+ var _c = _vm._self._c || _h;
149
+ return _c("div", {
144
150
  staticClass: "slide-panel-line"
145
- }, [t("div", {
151
+ }, [_c("div", {
146
152
  staticClass: "slide-panel-line-indicator"
147
153
  })]);
148
154
  }];
149
- const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], v = {
155
+ const TableView_vue_vue_type_style_index_0_lang = "";
156
+ const builtInButtons = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"];
157
+ const __vue2_script = {
150
158
  name: "TableView",
151
159
  bus: {
152
- reloadTableView(e, r) {
153
- if (this._viewIds)
154
- if (o(e) || d(e)) {
155
- let t = e;
156
- o(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (r ? this.$refs.tree && (n.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (n.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
157
- } else
158
- f.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
160
+ reloadTableView(viewId, tree) {
161
+ if (!this._viewIds) {
162
+ return;
163
+ }
164
+ if (isString(viewId) || isArray(viewId)) {
165
+ let viewIds = viewId;
166
+ if (isString(viewIds)) {
167
+ viewIds = viewIds.split(",");
168
+ }
169
+ if (this._viewIds.some((value) => viewIds.includes(value))) {
170
+ if (!tree) {
171
+ trace.call(this.$parent || {}, "reloadTable");
172
+ this.reloadTable();
173
+ } else {
174
+ if (this.$refs.tree) {
175
+ trace.call(this.$parent || {}, "reloadTree");
176
+ this.refreshTree();
177
+ }
178
+ }
179
+ }
180
+ } else {
181
+ warning.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
182
+ }
159
183
  }
160
184
  },
161
185
  props: {
@@ -203,7 +227,7 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
203
227
  borderRight: Boolean,
204
228
  border: {
205
229
  type: Boolean,
206
- default: !0
230
+ default: true
207
231
  },
208
232
  labelWidth: {
209
233
  type: String,
@@ -214,93 +238,132 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
214
238
  }
215
239
  },
216
240
  data() {
217
- var e;
241
+ var _a;
218
242
  return {
219
- importDialogVisible: !1,
220
- right: -(((e = this.searchPanelAttrs) == null ? void 0 : e.width) || 350),
243
+ importDialogVisible: false,
244
+ right: -(((_a = this.searchPanelAttrs) == null ? void 0 : _a.width) || 350),
221
245
  selectedRows: []
222
246
  };
223
247
  },
224
248
  computed: {
225
249
  buttonSlots() {
226
- return w.filter((e) => this.$scopedSlots[e]);
250
+ return builtInButtons.filter((value) => this.$scopedSlots[value]);
227
251
  },
228
252
  toolbarProps() {
229
- var s, l;
230
- const e = {}, r = i(this.toolbarAttrs, e);
231
- let t = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
232
- return t = t || [], t.includes("reload") || (t = [...t, "reload"]), r.buttons = t, r.buttons = p(r.buttons), r.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), r;
253
+ var _a, _b;
254
+ const defaultProps = {};
255
+ const toolbarAttrs = merge(this.toolbarAttrs, defaultProps);
256
+ let buttons = (toolbarAttrs == null ? void 0 : toolbarAttrs.buttons) || this.$parent.buttons;
257
+ buttons = buttons || [];
258
+ if (!buttons.includes("reload")) {
259
+ buttons = [...buttons, "reload"];
260
+ }
261
+ toolbarAttrs.buttons = buttons;
262
+ toolbarAttrs.buttons = toStringArray(toolbarAttrs.buttons);
263
+ toolbarAttrs.searchable = !!((_b = (_a = this.$scopedSlots)["search-form"]) == null ? void 0 : _b.call(_a));
264
+ return toolbarAttrs;
233
265
  },
234
266
  treeProps() {
235
- const e = {
267
+ const defaultProps = {
236
268
  treeProps: {
237
269
  children: "children",
238
270
  label: "label",
239
- isLeaf: (r) => c(r, "hasChildren") ? !r.hasChildren : c(r, "hasChild") ? !r.hasChild : !0
271
+ isLeaf: (data) => {
272
+ if (hasOwn(data, "hasChildren")) {
273
+ return !data.hasChildren;
274
+ } else if (hasOwn(data, "hasChild")) {
275
+ return !data.hasChild;
276
+ } else {
277
+ return true;
278
+ }
279
+ }
240
280
  },
241
- show: !1,
242
- lazy: !0,
243
- readonly: !0,
281
+ show: false,
282
+ lazy: true,
283
+ readonly: true,
244
284
  data: [],
245
- "expand-first-node": !1,
246
- "default-expand-all": !1
285
+ "expand-first-node": false,
286
+ "default-expand-all": false
247
287
  };
248
- return i(this.treeAttrs, e);
288
+ return merge(this.treeAttrs, defaultProps);
249
289
  },
250
290
  tableProps() {
251
- const e = this.tableAttrs.api || this.$parent.getPage, r = {
291
+ const api = this.tableAttrs.api || this.$parent.getPage;
292
+ const defaultProps = {
252
293
  model: this.searchModel || {},
253
294
  height: "auto",
254
- "highlight-current-row": !0,
255
- api: e
295
+ "highlight-current-row": true,
296
+ api
256
297
  };
257
- return i(this.tableAttrs, r);
298
+ return merge(this.tableAttrs, defaultProps);
258
299
  },
259
300
  searchPanelProps() {
260
- const e = {
301
+ const defaultProps = {
261
302
  width: 350,
262
303
  model: this.searchModel || {}
263
304
  };
264
- return i(this.searchPanelAttrs, e);
305
+ return merge(this.searchPanelAttrs, defaultProps);
265
306
  }
266
307
  },
267
308
  created() {
268
- this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
309
+ this._viewIds = [];
310
+ if (this.viewId) {
311
+ this._viewIds.push(this.viewId);
312
+ }
313
+ if (!this._viewIds.includes(this.$parent.$options.name)) {
314
+ this._viewIds.push(this.$parent.$options.name);
315
+ }
269
316
  },
270
317
  async activated() {
271
- this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
318
+ if (this.$refs.treeScroller) {
319
+ if (this.treeScrollTop) {
320
+ this.$refs.treeScroller.scrollTop = this.treeScrollTop;
321
+ }
322
+ if (this.treeScrollLeft) {
323
+ this.$refs.treeScroller.scrollLeft = this.treeScrollLeft;
324
+ }
325
+ }
272
326
  },
273
327
  methods: {
274
328
  onTreeScroll() {
275
- this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
329
+ this.treeScrollTop = this.$refs.treeScroller.scrollTop;
330
+ this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
276
331
  },
277
332
  toggleSearch() {
278
333
  this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
279
334
  },
280
335
  async onSearchClick() {
281
- this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), await this.refreshTable();
336
+ this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model);
337
+ await this.refreshTable();
282
338
  },
283
339
  async onClearClick() {
284
- this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), await this.refreshTable();
285
- },
286
- openFrom(e) {
287
- this.$router.push(b(this.formPath, e));
288
- },
289
- rowDbClick(e) {
290
- var r;
291
- !((r = this.tableListeners) != null && r["row-dblclick"]) && this.formPath && this.openFrom(e);
340
+ this.$emit("reset");
341
+ this.$refs.form.resetFields();
342
+ this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model);
343
+ await this.refreshTable();
344
+ },
345
+ openFrom(row) {
346
+ this.$router.push(fillPath(this.formPath, row));
347
+ },
348
+ rowDbClick(row) {
349
+ var _a;
350
+ if (!((_a = this.tableListeners) == null ? void 0 : _a["row-dblclick"]) && this.formPath) {
351
+ this.openFrom(row);
352
+ }
292
353
  },
293
- onSelectionChange(e) {
294
- this.selectedRows = e;
354
+ onSelectionChange(rows) {
355
+ this.selectedRows = rows;
295
356
  },
296
357
  create() {
297
- var e;
298
- !((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
358
+ var _a;
359
+ if (!((_a = this.toolbarListeners) == null ? void 0 : _a.create) && this.formPath) {
360
+ this.openFrom();
361
+ }
299
362
  },
300
363
  async del() {
301
- var r;
302
- const e = this.deleteApi || this.$parent.del;
303
- if (!((r = this.toolbarListeners) != null && r.del) && u(e)) {
364
+ var _a;
365
+ const api = this.deleteApi || this.$parent.del;
366
+ if (!((_a = this.toolbarListeners) == null ? void 0 : _a.del) && isFunction(api)) {
304
367
  if (!this.selectedRows.length) {
305
368
  this.$message.warning("请选择要删除的记录!");
306
369
  return;
@@ -310,28 +373,34 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
310
373
  "系统提示",
311
374
  {
312
375
  type: "warning",
313
- modal: !0,
314
- dangerouslyUseHTMLString: !0,
315
- closeOnClickModal: !1,
316
- beforeClose: async (t, s, l) => {
317
- if (t === "confirm")
376
+ modal: true,
377
+ dangerouslyUseHTMLString: true,
378
+ closeOnClickModal: false,
379
+ beforeClose: async (action, instance, done) => {
380
+ if (action === "confirm") {
318
381
  try {
319
- s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", await e.call(this, this.selectedRows.map((a) => a.id).join(",")), this.$message.success("删除成功"), await this.reloadTable(), await this.refreshTree();
320
- } catch {
382
+ instance.confirmButtonLoading = true;
383
+ instance.confirmButtonText = "删除...";
384
+ await api.call(this, this.selectedRows.map((value) => value.id).join(","));
385
+ this.$message.success("删除成功");
386
+ await this.reloadTable();
387
+ await this.refreshTree();
388
+ } catch (_) {
321
389
  }
322
- l();
390
+ }
391
+ done();
323
392
  }
324
393
  }
325
- ).catch((t) => t);
394
+ ).catch((_) => _);
326
395
  }
327
396
  },
328
397
  reloadTable() {
329
- var e;
330
- (e = this.$refs.table) == null || e.reload();
398
+ var _a;
399
+ (_a = this.$refs.table) == null ? void 0 : _a.reload();
331
400
  },
332
401
  async refreshTable() {
333
- var e;
334
- await ((e = this.$refs.table) == null ? void 0 : e.getPage());
402
+ var _a;
403
+ await ((_a = this.$refs.table) == null ? void 0 : _a.getPage());
335
404
  },
336
405
  refreshTree() {
337
406
  this.$refs.tree.reloadTree();
@@ -340,24 +409,26 @@ const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
340
409
  return this.searchPanelProps.model;
341
410
  }
342
411
  }
343
- }, h = {};
344
- var y = /* @__PURE__ */ m(
345
- v,
346
- _,
347
- g,
348
- !1,
349
- P,
412
+ };
413
+ const __cssModules = {};
414
+ var __component__ = /* @__PURE__ */ normalizeComponent(
415
+ __vue2_script,
416
+ render,
417
+ staticRenderFns,
418
+ false,
419
+ __vue2_injectStyles,
350
420
  null,
351
421
  null,
352
422
  null
353
423
  );
354
- function P(e) {
355
- for (let r in h)
356
- this[r] = h[r];
424
+ function __vue2_injectStyles(context) {
425
+ for (let o in __cssModules) {
426
+ this[o] = __cssModules[o];
427
+ }
357
428
  }
358
- const C = /* @__PURE__ */ function() {
359
- return y.exports;
429
+ const TableView = /* @__PURE__ */ function() {
430
+ return __component__.exports;
360
431
  }();
361
432
  export {
362
- C as default
433
+ TableView as default
363
434
  };
@@ -1 +1,95 @@
1
- .table-view{display:flex;flex-direction:column;height:100%}.table-view .el-table--border{border:none}.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 .table-view-content-wrapper{position:relative;flex:1;overflow:hidden}.table-view .table-view-content{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;background-color:#fff}.table-view .table-view-sidebar{flex-shrink:0;width:240px;height:100%;padding:10px;overflow:auto}.table-view .table-view-sidebar .et-tree-wrapper{display:table;overflow:visible}.table-view .table-view-table{flex:1 1 auto;height:100%}.table-view .slide-panel{position:absolute;top:0;right:0;bottom:0;z-index:5;display:flex;background-color:#fff;transition:right .2s ease}.table-view .slide-panel .slide-panel-line{position:relative;width:3px;height:100%;background-color:#ddd;flex-shrink:0}.table-view .slide-panel .slide-panel-line-indicator{position:absolute;top:50%;left:0;width:100%;height:50px;background-color:#aaa;transform:translateY(-50%)}.table-view .slide-panel .slide-panel-actions{display:flex;align-items:center;justify-content:center;margin-top:10px}.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
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .table-view {
8
+ display: flex;
9
+ flex-direction: column;
10
+ height: 100%;
11
+ }
12
+ .table-view .el-table--border {
13
+ border: none;
14
+ }
15
+ .table-view .border-top .el-table--border {
16
+ border-top: 1px solid #ebeef5;
17
+ }
18
+ .table-view .border-bottom .el-table--border {
19
+ border-bottom: 1px solid #ebeef5;
20
+ }
21
+ .table-view .border-left .el-table--border, .table-view .border-left .el-pagination {
22
+ border-left: 1px solid #ebeef5;
23
+ }
24
+ .table-view .border-right .el-table--border {
25
+ border-right: 1px solid #ebeef5;
26
+ }
27
+ .table-view .table-view-content-wrapper {
28
+ position: relative;
29
+ flex: 1;
30
+ overflow: hidden;
31
+ }
32
+ .table-view .table-view-content {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ display: flex;
37
+ width: 100%;
38
+ height: 100%;
39
+ background-color: white;
40
+ }
41
+ .table-view .table-view-sidebar {
42
+ flex-shrink: 0;
43
+ width: 240px;
44
+ height: 100%;
45
+ padding: 10px;
46
+ overflow: auto;
47
+ }
48
+ .table-view .table-view-sidebar .et-tree-wrapper {
49
+ display: table;
50
+ overflow: visible;
51
+ }
52
+ .table-view .table-view-table {
53
+ flex: 1 1 auto;
54
+ height: 100%;
55
+ }
56
+ .table-view .slide-panel {
57
+ position: absolute;
58
+ top: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ z-index: 5;
62
+ display: flex;
63
+ background-color: white;
64
+ transition: right 200ms ease;
65
+ }
66
+ .table-view .slide-panel .slide-panel-line {
67
+ position: relative;
68
+ width: 3px;
69
+ height: 100%;
70
+ background-color: #ddd;
71
+ flex-shrink: 0;
72
+ }
73
+ .table-view .slide-panel .slide-panel-line-indicator {
74
+ position: absolute;
75
+ top: 50%;
76
+ left: 0;
77
+ width: 100%;
78
+ height: 50px;
79
+ background-color: #aaa;
80
+ transform: translateY(-50%);
81
+ }
82
+ .table-view .slide-panel .slide-panel-actions {
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ margin-top: 10px;
87
+ }
88
+ .table-view .slide-panel .slide-panel-content {
89
+ flex: 1;
90
+ padding: 10px;
91
+ overflow: auto;
92
+ }
93
+ .table-view .slide-panel .slide-panel-content .el-date-editor {
94
+ width: 100%;
95
+ }