@web-utils/component 2.0.12 → 2.0.14

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