@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,35 +1,43 @@
1
- import { n as r } from "../../chunks/5d4282fb.js";
2
- var s = function() {
3
- var e = this, t = e.$createElement;
4
- return e._self._c, e._m(0);
5
- }, o = [function() {
6
- var e = this, t = e.$createElement, n = e._self._c || t;
7
- return n("div", {
1
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
2
+ var render = function() {
3
+ var _vm = this;
4
+ var _h = _vm.$createElement;
5
+ _vm._self._c || _h;
6
+ return _vm._m(0);
7
+ };
8
+ var staticRenderFns = [function() {
9
+ var _vm = this;
10
+ var _h = _vm.$createElement;
11
+ var _c = _vm._self._c || _h;
12
+ return _c("div", {
8
13
  staticClass: "not-implement"
9
- }, [n("div", [n("i", {
14
+ }, [_c("div", [_c("i", {
10
15
  staticClass: "fa fa-wrench"
11
- }), e._v(" 建设中... ")])]);
16
+ }), _vm._v(" 建设中... ")])]);
12
17
  }];
13
- const a = {
18
+ const NotImplement_vue_vue_type_style_index_0_lang = "";
19
+ const __vue2_script = {
14
20
  name: "NotImplement"
15
- }, _ = {};
16
- var l = /* @__PURE__ */ r(
17
- a,
18
- s,
19
- o,
20
- !1,
21
- c,
21
+ };
22
+ const __cssModules = {};
23
+ var __component__ = /* @__PURE__ */ normalizeComponent(
24
+ __vue2_script,
25
+ render,
26
+ staticRenderFns,
27
+ false,
28
+ __vue2_injectStyles,
22
29
  null,
23
30
  null,
24
31
  null
25
32
  );
26
- function c(e) {
27
- for (let t in _)
28
- this[t] = _[t];
33
+ function __vue2_injectStyles(context) {
34
+ for (let o in __cssModules) {
35
+ this[o] = __cssModules[o];
36
+ }
29
37
  }
30
- const m = /* @__PURE__ */ function() {
31
- return l.exports;
38
+ const NotImplement = /* @__PURE__ */ function() {
39
+ return __component__.exports;
32
40
  }();
33
41
  export {
34
- m as default
42
+ NotImplement as default
35
43
  };
@@ -1 +1,15 @@
1
- .not-implement{display:flex;align-items:center;justify-content:center;height:100%;color:gray;font-size:3em;text-align:center}
1
+ /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .not-implement {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ height: 100%;
12
+ color: gray;
13
+ font-size: 3em;
14
+ text-align: center;
15
+ }
@@ -1,40 +1,46 @@
1
- import { n as o } from "../../chunks/5d4282fb.js";
2
- var l = function() {
3
- var e = this, t = e.$createElement, a = e._self._c || t;
4
- return a("div", {
1
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
2
+ var render = function() {
3
+ var _vm = this;
4
+ var _h = _vm.$createElement;
5
+ var _c = _vm._self._c || _h;
6
+ return _c("div", {
5
7
  staticClass: "page flex-row flex-item",
6
8
  class: {
7
- vertical: e.vertical && !e.horizontal
9
+ vertical: _vm.vertical && !_vm.horizontal
8
10
  }
9
- }, [e._t("default")], 2);
10
- }, r = [];
11
- const s = {
11
+ }, [_vm._t("default")], 2);
12
+ };
13
+ var staticRenderFns = [];
14
+ const Page_vue_vue_type_style_index_0_lang = "";
15
+ const __vue2_script = {
12
16
  name: "Page",
13
17
  props: {
14
18
  vertical: {
15
19
  type: Boolean,
16
- default: !0
20
+ default: true
17
21
  },
18
22
  horizontal: Boolean
19
23
  }
20
- }, n = {};
21
- var _ = /* @__PURE__ */ o(
22
- s,
23
- l,
24
- r,
25
- !1,
26
- c,
24
+ };
25
+ const __cssModules = {};
26
+ var __component__ = /* @__PURE__ */ normalizeComponent(
27
+ __vue2_script,
28
+ render,
29
+ staticRenderFns,
30
+ false,
31
+ __vue2_injectStyles,
27
32
  null,
28
33
  null,
29
34
  null
30
35
  );
31
- function c(e) {
32
- for (let t in n)
33
- this[t] = n[t];
36
+ function __vue2_injectStyles(context) {
37
+ for (let o in __cssModules) {
38
+ this[o] = __cssModules[o];
39
+ }
34
40
  }
35
- const u = /* @__PURE__ */ function() {
36
- return _.exports;
41
+ const Page = /* @__PURE__ */ function() {
42
+ return __component__.exports;
37
43
  }();
38
44
  export {
39
- u as default
45
+ Page as default
40
46
  };
@@ -1 +1,12 @@
1
- .page{height:100%}.page.vertical{flex-direction:column}
1
+ /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .page {
8
+ height: 100%;
9
+ }
10
+ .page.vertical {
11
+ flex-direction: column;
12
+ }
@@ -1,27 +1,31 @@
1
- import { n as a } from "../../chunks/5d4282fb.js";
2
- var r = function() {
3
- var e = this, t = e.$createElement, n = e._self._c || t;
4
- return n("div", {
1
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
2
+ var render = function() {
3
+ var _vm = this;
4
+ var _h = _vm.$createElement;
5
+ var _c = _vm._self._c || _h;
6
+ return _c("div", {
5
7
  staticClass: "egd-header flex-row egd-page-header"
6
- }, [e._t("section-title", function() {
7
- return [n("span", {
8
+ }, [_vm._t("section-title", function() {
9
+ return [_c("span", {
8
10
  staticClass: "section-title"
9
- }, [e._t("title", function() {
10
- return [e._v(e._s(e.title))];
11
+ }, [_vm._t("title", function() {
12
+ return [_vm._v(_vm._s(_vm.title))];
11
13
  }, {
12
- title: e.title
14
+ "title": _vm.title
13
15
  })], 2)];
14
16
  }, {
15
- title: e.title
16
- }), n("div", {
17
+ "title": _vm.title
18
+ }), _c("div", {
17
19
  staticClass: "flex-row flex-item vertical-center"
18
- }, [n("div", {
20
+ }, [_c("div", {
19
21
  class: ["flex-row", "flex-item", "vertical-center", {
20
- "align-end": e.alignEnd
22
+ "align-end": _vm.alignEnd
21
23
  }]
22
- }, [e._t("default")], 2)])], 2);
23
- }, i = [];
24
- const s = {
24
+ }, [_vm._t("default")], 2)])], 2);
25
+ };
26
+ var staticRenderFns = [];
27
+ const PageHeader_vue_vue_type_style_index_0_lang = "";
28
+ const __vue2_script = {
25
29
  name: "PageHeader",
26
30
  props: {
27
31
  title: {
@@ -30,27 +34,29 @@ const s = {
30
34
  },
31
35
  alignEnd: {
32
36
  type: Boolean,
33
- default: !0
37
+ default: true
34
38
  }
35
39
  }
36
- }, l = {};
37
- var o = /* @__PURE__ */ a(
38
- s,
39
- r,
40
- i,
41
- !1,
42
- _,
40
+ };
41
+ const __cssModules = {};
42
+ var __component__ = /* @__PURE__ */ normalizeComponent(
43
+ __vue2_script,
44
+ render,
45
+ staticRenderFns,
46
+ false,
47
+ __vue2_injectStyles,
43
48
  null,
44
49
  null,
45
50
  null
46
51
  );
47
- function _(e) {
48
- for (let t in l)
49
- this[t] = l[t];
52
+ function __vue2_injectStyles(context) {
53
+ for (let o in __cssModules) {
54
+ this[o] = __cssModules[o];
55
+ }
50
56
  }
51
- const u = /* @__PURE__ */ function() {
52
- return o.exports;
57
+ const PageHeader = /* @__PURE__ */ function() {
58
+ return __component__.exports;
53
59
  }();
54
60
  export {
55
- u as default
61
+ PageHeader as default
56
62
  };
@@ -1 +1,14 @@
1
- .egd-page-header{height:40px;margin:0 10px;line-height:40px}.egd-page-header .align-end{justify-content:flex-end}
1
+ /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .egd-page-header {
8
+ height: 40px;
9
+ margin: 0 10px;
10
+ line-height: 40px;
11
+ }
12
+ .egd-page-header .align-end {
13
+ justify-content: flex-end;
14
+ }
@@ -1,64 +1,68 @@
1
- import { treeToArray as d, findFirstMatchNode as n } from "@web-utils/core";
2
- import { n as o } from "../../chunks/5d4282fb.js";
3
- var l = function() {
4
- var t = this, a = t.$createElement, e = t._self._c || a;
5
- return e("div", {
1
+ import { treeToArray, findFirstMatchNode } from "@web-utils/core";
2
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
3
+ var render = function() {
4
+ var _vm = this;
5
+ var _h = _vm.$createElement;
6
+ var _c = _vm._self._c || _h;
7
+ return _c("div", {
6
8
  staticClass: "egd-container"
7
- }, [t.aside ? e("div", {
9
+ }, [_vm.aside ? _c("div", {
8
10
  staticClass: "egd-aside",
9
11
  style: {
10
- width: t.asideWidth
12
+ width: _vm.asideWidth
11
13
  }
12
- }, [t._t("aside", function() {
13
- return [e("div", {
14
+ }, [_vm._t("aside", function() {
15
+ return [_c("div", {
14
16
  staticClass: "egd-main"
15
- }, [t._t("nav-top"), e("div", {
17
+ }, [_vm._t("nav-top"), _c("div", {
16
18
  staticClass: "egd-header"
17
- }, [e("span", {
19
+ }, [_c("span", {
18
20
  staticClass: "section-title flex-not-shrink"
19
- }, [t._v(t._s(t.sectionTitle))])]), t._t("menu", function() {
20
- return [e("ElTree", {
21
+ }, [_vm._v(_vm._s(_vm.sectionTitle))])]), _vm._t("menu", function() {
22
+ return [_c("ElTree", {
21
23
  ref: "menuTree",
22
24
  attrs: {
23
- data: t.menus,
25
+ "data": _vm.menus,
24
26
  "default-expand-all": "",
25
- props: t.defaultProps,
27
+ "props": _vm.defaultProps,
26
28
  "highlight-current": "",
27
29
  "empty-text": "请配置菜单!",
28
- "default-expanded-keys": t.currentTreeKey,
30
+ "default-expanded-keys": _vm.currentTreeKey,
29
31
  "node-key": "key"
30
32
  },
31
33
  on: {
32
- "node-click": t.onNodeClick
34
+ "node-click": _vm.onNodeClick
33
35
  },
34
- scopedSlots: t._u([{
36
+ scopedSlots: _vm._u([{
35
37
  key: "default",
36
- fn: function(s) {
37
- var i = s.data, u = s.node;
38
- return [t._t("tree-node", function() {
39
- return [e("span", [e("i", {
40
- class: i.icon
41
- }), t._v(" " + t._s(i.label))])];
38
+ fn: function(_ref) {
39
+ var data = _ref.data, node = _ref.node;
40
+ return [_vm._t("tree-node", function() {
41
+ return [_c("span", [_c("i", {
42
+ class: data.icon
43
+ }), _vm._v(" " + _vm._s(data.label))])];
42
44
  }, {
43
- data: i,
44
- node: u
45
+ "data": data,
46
+ "node": node
45
47
  })];
46
48
  }
47
- }], null, !0)
49
+ }], null, true)
48
50
  })];
49
51
  })], 2)];
50
- })], 2) : t._e(), e("div", {
52
+ })], 2) : _vm._e(), _c("div", {
51
53
  staticClass: "page-index-content",
52
54
  style: {
53
- width: t.aside ? `calc(100% - ${t.asideWidth})` : "100%"
55
+ width: _vm.aside ? `calc(100% - ${_vm.asideWidth})` : "100%"
54
56
  }
55
- }, [t._t("default", function() {
56
- return [e("div", {
57
+ }, [_vm._t("default", function() {
58
+ return [_c("div", {
57
59
  staticClass: "page-index-content-empty"
58
- }, [t._v(" " + t._s(t.tips) + " ")])];
60
+ }, [_vm._v(" " + _vm._s(_vm.tips) + " ")])];
59
61
  })], 2)]);
60
- }, c = [];
61
- const h = {
62
+ };
63
+ var staticRenderFns = [];
64
+ const PageIndex_vue_vue_type_style_index_0_lang = "";
65
+ const __vue2_script = {
62
66
  name: "PageIndex",
63
67
  props: {
64
68
  menus: {
@@ -71,7 +75,7 @@ const h = {
71
75
  },
72
76
  aside: {
73
77
  type: Boolean,
74
- default: !0
78
+ default: true
75
79
  },
76
80
  tips: {
77
81
  type: String,
@@ -107,45 +111,62 @@ const h = {
107
111
  },
108
112
  methods: {
109
113
  async activeFirstMenu() {
110
- if (d(this.menus).map((a) => a.path).filter((a) => a).includes(this.$route.path))
114
+ const paths = treeToArray(this.menus).map((value) => value.path).filter((value) => value);
115
+ if (!paths.includes(this.$route.path)) {
116
+ const menuItem = findFirstMatchNode(this.menus, (node) => node.path);
117
+ if (menuItem) {
118
+ await this.$router.push({ path: menuItem.path, query: menuItem.query });
119
+ await this.setCurrentKey(menuItem.path);
120
+ }
121
+ } else {
111
122
  await this.setCurrentKey(this.$route.path);
112
- else {
113
- const a = n(this.menus, (e) => e.path);
114
- a && (await this.$router.push({ path: a.path, query: a.query }), await this.setCurrentKey(a.path));
115
123
  }
116
124
  },
117
- async onNodeClick(t) {
118
- t.path && t.path.indexOf("/") > -1 && await this.$router.push({ path: t.path, query: t.query }), await this.setCurrentKey(t.key);
125
+ async onNodeClick(node) {
126
+ if (node.path && node.path.indexOf("/") > -1) {
127
+ await this.$router.push({ path: node.path, query: node.query });
128
+ }
129
+ await this.setCurrentKey(node.key);
119
130
  },
120
- async setCurrentKey(t) {
121
- await this.$nextTick(), this.$refs.menuTree && this.$refs.menuTree.setCurrentKey(t);
131
+ async setCurrentKey(path) {
132
+ await this.$nextTick();
133
+ this.$refs.menuTree && this.$refs.menuTree.setCurrentKey(path);
122
134
  },
123
- async beforeRouteUpdate(t, a, e) {
124
- if (t.path === this.schema) {
125
- const s = n(this.menus, (i) => i.path);
126
- s ? (await e({ path: s.path, query: s.query }), await this.setCurrentKey(s.path)) : await e(!1);
127
- } else
128
- await e(), await this.setCurrentKey(this.$route.path);
135
+ async beforeRouteUpdate(to, from, next) {
136
+ if (to.path === this.schema) {
137
+ const menuItem = findFirstMatchNode(this.menus, (node) => node.path);
138
+ if (menuItem) {
139
+ await next({ path: menuItem.path, query: menuItem.query });
140
+ await this.setCurrentKey(menuItem.path);
141
+ } else {
142
+ await next(false);
143
+ }
144
+ } else {
145
+ await next();
146
+ await this.setCurrentKey(this.$route.path);
147
+ }
129
148
  }
130
149
  }
131
- }, r = {};
132
- var p = /* @__PURE__ */ o(
133
- h,
134
- l,
135
- c,
136
- !1,
137
- y,
150
+ };
151
+ const __cssModules = {};
152
+ var __component__ = /* @__PURE__ */ normalizeComponent(
153
+ __vue2_script,
154
+ render,
155
+ staticRenderFns,
156
+ false,
157
+ __vue2_injectStyles,
138
158
  null,
139
159
  null,
140
160
  null
141
161
  );
142
- function y(t) {
143
- for (let a in r)
144
- this[a] = r[a];
162
+ function __vue2_injectStyles(context) {
163
+ for (let o in __cssModules) {
164
+ this[o] = __cssModules[o];
165
+ }
145
166
  }
146
- const m = /* @__PURE__ */ function() {
147
- return p.exports;
167
+ const PageIndex = /* @__PURE__ */ function() {
168
+ return __component__.exports;
148
169
  }();
149
170
  export {
150
- m as default
171
+ PageIndex as default
151
172
  };
@@ -1 +1,23 @@
1
- .page-index-content{display:flex;flex:1 1 auto;flex-direction:column;height:100%;padding:0;overflow:hidden}.page-index-content-empty{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:gray;font-size:20px}
1
+ /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .page-index-content {
8
+ display: flex;
9
+ flex: 1 1 auto;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ padding: 0;
13
+ overflow: hidden;
14
+ }
15
+ .page-index-content-empty {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ width: 100%;
20
+ height: 100%;
21
+ color: #808080;
22
+ font-size: 20px;
23
+ }
@@ -1,55 +1,58 @@
1
- import { treeToArray as u, findFirstMatchNode as s } from "@web-utils/core";
2
- import { n as o } from "../../chunks/5d4282fb.js";
3
- var c = function() {
4
- var t = this, e = t.$createElement, a = t._self._c || e;
5
- return t.menus && t.menus.length ? a("PageSkeleton", {
6
- scopedSlots: t._u([{
1
+ import { treeToArray, findFirstMatchNode } from "@web-utils/core";
2
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
3
+ var render = function() {
4
+ var _vm = this;
5
+ var _h = _vm.$createElement;
6
+ var _c = _vm._self._c || _h;
7
+ return _vm.menus && _vm.menus.length ? _c("PageSkeleton", {
8
+ scopedSlots: _vm._u([{
7
9
  key: "header",
8
10
  fn: function() {
9
- return [a("PageHeader", {
10
- scopedSlots: t._u([{
11
+ return [_c("PageHeader", {
12
+ scopedSlots: _vm._u([{
11
13
  key: "section-title",
12
14
  fn: function() {
13
- return [a("ElTabs", {
15
+ return [_c("ElTabs", {
14
16
  on: {
15
- "tab-click": t.tabClick
17
+ "tab-click": _vm.tabClick
16
18
  },
17
19
  model: {
18
- value: t.activeTab,
19
- callback: function(n) {
20
- t.activeTab = n;
20
+ value: _vm.activeTab,
21
+ callback: function($$v) {
22
+ _vm.activeTab = $$v;
21
23
  },
22
24
  expression: "activeTab"
23
25
  }
24
- }, t._l(t.menus, function(n) {
25
- return a("ElTabPane", {
26
- key: n.path,
26
+ }, _vm._l(_vm.menus, function(item) {
27
+ return _c("ElTabPane", {
28
+ key: item.path,
27
29
  attrs: {
28
- label: n.label,
29
- name: `${n.path}`
30
+ "label": item.label,
31
+ "name": `${item.path}`
30
32
  }
31
33
  });
32
34
  }), 1)];
33
35
  },
34
- proxy: !0
35
- }], null, !1, 412017982)
36
+ proxy: true
37
+ }], null, false, 412017982)
36
38
  })];
37
39
  },
38
- proxy: !0
39
- }], null, !1, 2288233724)
40
- }, [t._t("default", function() {
41
- return [a("EmptyView", {
40
+ proxy: true
41
+ }], null, false, 2288233724)
42
+ }, [_vm._t("default", function() {
43
+ return [_c("EmptyView", {
42
44
  attrs: {
43
- "empty-tips": t.tips
45
+ "empty-tips": _vm.tips
44
46
  }
45
47
  })];
46
- })], 2) : a("EmptyView", {
48
+ })], 2) : _c("EmptyView", {
47
49
  attrs: {
48
50
  "empty-tips": "暂无权限!"
49
51
  }
50
52
  });
51
- }, l = [];
52
- const p = {
53
+ };
54
+ var staticRenderFns = [];
55
+ const __vue2_script = {
53
56
  name: "PageIndexTop",
54
57
  props: {
55
58
  menus: {
@@ -78,42 +81,54 @@ const p = {
78
81
  },
79
82
  methods: {
80
83
  async activeFirstMenu() {
81
- if (u(this.menus).map((e) => e.path).filter((e) => e).includes(this.$route.path))
84
+ const paths = treeToArray(this.menus).map((value) => value.path).filter((value) => value);
85
+ if (!paths.includes(this.$route.path)) {
86
+ const menuItem = findFirstMatchNode(this.menus, (node) => node.path);
87
+ if (menuItem) {
88
+ this.activeTab = menuItem.path;
89
+ await this.$router.push({ path: menuItem.path, query: menuItem.query });
90
+ }
91
+ } else {
82
92
  this.activeTab = this.$route.path;
83
- else {
84
- const e = s(this.menus, (a) => a.path);
85
- e && (this.activeTab = e.path, await this.$router.push({ path: e.path, query: e.query }));
86
93
  }
87
94
  },
88
- async tabClick(t) {
89
- await this.$router.push(t.name);
95
+ async tabClick(tab) {
96
+ await this.$router.push(tab.name);
90
97
  },
91
- async beforeRouteUpdate(t, e, a) {
92
- if (t.path === this.schema) {
93
- const n = s(this.menus, (i) => i.path);
94
- n ? (await a({ path: n.path, query: n.query }), this.activeTab = n.path) : await a(!1);
95
- } else
96
- await a();
98
+ async beforeRouteUpdate(to, from, next) {
99
+ if (to.path === this.schema) {
100
+ const menuItem = findFirstMatchNode(this.menus, (node) => node.path);
101
+ if (menuItem) {
102
+ await next({ path: menuItem.path, query: menuItem.query });
103
+ this.activeTab = menuItem.path;
104
+ } else {
105
+ await next(false);
106
+ }
107
+ } else {
108
+ await next();
109
+ }
97
110
  }
98
111
  }
99
- }, r = {};
100
- var h = /* @__PURE__ */ o(
101
- p,
102
- c,
103
- l,
104
- !1,
105
- m,
112
+ };
113
+ const __cssModules = {};
114
+ var __component__ = /* @__PURE__ */ normalizeComponent(
115
+ __vue2_script,
116
+ render,
117
+ staticRenderFns,
118
+ false,
119
+ __vue2_injectStyles,
106
120
  null,
107
121
  null,
108
122
  null
109
123
  );
110
- function m(t) {
111
- for (let e in r)
112
- this[e] = r[e];
124
+ function __vue2_injectStyles(context) {
125
+ for (let o in __cssModules) {
126
+ this[o] = __cssModules[o];
127
+ }
113
128
  }
114
- const y = /* @__PURE__ */ function() {
115
- return h.exports;
129
+ const PageIndexTop = /* @__PURE__ */ function() {
130
+ return __component__.exports;
116
131
  }();
117
132
  export {
118
- y as default
133
+ PageIndexTop as default
119
134
  };