ele-admin-plus 1.1.3 → 1.1.4-beta.1

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 (269) hide show
  1. package/es/ele-alert/index.d.ts +10 -10
  2. package/es/ele-alert/props.d.ts +6 -6
  3. package/es/ele-app/style/message.scss +1 -0
  4. package/es/ele-app/style/overwrite.scss +79 -3
  5. package/es/ele-app/types/index.d.ts +7 -6
  6. package/es/ele-avatar-group/index.d.ts +7 -8
  7. package/es/ele-avatar-group/props.d.ts +3 -4
  8. package/es/ele-basic-select/style/index.scss +4 -6
  9. package/es/ele-bottom-bar/index.d.ts +4 -4
  10. package/es/ele-bottom-bar/props.d.ts +2 -3
  11. package/es/ele-card/index.d.ts +6 -6
  12. package/es/ele-card/props.d.ts +3 -4
  13. package/es/ele-check-card/components/card-item.d.ts +2 -3
  14. package/es/ele-check-card/index.d.ts +4 -4
  15. package/es/ele-check-card/props.d.ts +3 -3
  16. package/es/ele-config-provider/receiver.d.ts +1 -1
  17. package/es/ele-config-provider/receiver.js +29 -29
  18. package/es/ele-copyable/index.d.ts +8 -8
  19. package/es/ele-copyable/index.js +5 -4
  20. package/es/ele-copyable/props.d.ts +5 -5
  21. package/es/ele-copyable/style/index.scss +4 -0
  22. package/es/ele-cropper/index.js +2 -2
  23. package/es/ele-dashboard/index.d.ts +1 -2
  24. package/es/ele-drawer/index.d.ts +16 -10
  25. package/es/ele-drawer/props.d.ts +7 -6
  26. package/es/ele-dropdown/index.d.ts +2 -2
  27. package/es/ele-dropdown/props.d.ts +1 -2
  28. package/es/ele-edit-tag/index.d.ts +4 -4
  29. package/es/ele-edit-tag/props.d.ts +2 -3
  30. package/es/ele-ellipsis/index.d.ts +4 -5
  31. package/es/ele-ellipsis/props.d.ts +1 -1
  32. package/es/ele-ellipsis/style/index.scss +4 -0
  33. package/es/ele-file-list/index.d.ts +2 -7
  34. package/es/ele-file-list/index.js +2 -2
  35. package/es/ele-file-list/types/index.d.ts +0 -4
  36. package/es/ele-icon-select/components/icon-grid.d.ts +5 -5
  37. package/es/ele-icon-select/components/icon-popper.d.ts +15 -15
  38. package/es/ele-icon-select/index.d.ts +15 -16
  39. package/es/ele-icon-select/props.d.ts +8 -8
  40. package/es/ele-loading/index.d.ts +26 -1
  41. package/es/ele-loading/index.js +53 -11
  42. package/es/ele-loading/props.d.ts +11 -1
  43. package/es/ele-loading/props.js +16 -1
  44. package/es/ele-loading/style/css-var.scss +7 -0
  45. package/es/ele-loading/style/index.js +1 -0
  46. package/es/ele-loading/style/index.scss +90 -0
  47. package/es/ele-loading/types/index.d.ts +17 -0
  48. package/es/ele-map-picker/components/map-view.d.ts +2 -2
  49. package/es/ele-map-picker/index.d.ts +2 -2
  50. package/es/ele-map-picker/props.d.ts +3 -3
  51. package/es/ele-menus/index.d.ts +2 -0
  52. package/es/ele-menus/index.js +11 -5
  53. package/es/ele-menus/props.d.ts +10 -0
  54. package/es/ele-menus/props.js +7 -1
  55. package/es/ele-menus/style/index.scss +18 -18
  56. package/es/ele-menus/types/index.d.ts +4 -0
  57. package/es/ele-menus/util.d.ts +4 -3
  58. package/es/ele-menus/util.js +23 -12
  59. package/es/ele-modal/index.d.ts +19 -13
  60. package/es/ele-modal/props.d.ts +8 -7
  61. package/es/ele-modal/util.js +2 -2
  62. package/es/ele-pagination/index.d.ts +1 -1
  63. package/es/ele-popconfirm/index.d.ts +10 -10
  64. package/es/ele-popconfirm/index.js +8 -2
  65. package/es/ele-popconfirm/props.d.ts +6 -6
  66. package/es/ele-popover/index.d.ts +6 -6
  67. package/es/ele-popover/props.d.ts +3 -4
  68. package/es/ele-printer/index.d.ts +6 -6
  69. package/es/ele-printer/props.d.ts +3 -4
  70. package/es/ele-pro-layout/components/pro-header.d.ts +7 -2
  71. package/es/ele-pro-layout/components/pro-header.js +15 -5
  72. package/es/ele-pro-layout/components/pro-iframe.js +10 -7
  73. package/es/ele-pro-layout/components/pro-sidebar.d.ts +7 -2
  74. package/es/ele-pro-layout/components/pro-sidebar.js +14 -5
  75. package/es/ele-pro-layout/components/pro-sidebox.d.ts +11 -4
  76. package/es/ele-pro-layout/components/pro-sidebox.js +16 -5
  77. package/es/ele-pro-layout/components/tab-dropdown.js +1 -4
  78. package/es/ele-pro-layout/index.d.ts +17 -3
  79. package/es/ele-pro-layout/index.js +208 -105
  80. package/es/ele-pro-layout/props.d.ts +6 -1
  81. package/es/ele-pro-layout/props.js +10 -0
  82. package/es/ele-pro-layout/style/collapse.scss +9 -10
  83. package/es/ele-pro-layout/style/index.js +0 -1
  84. package/es/ele-pro-layout/types/index.d.ts +9 -0
  85. package/es/ele-pro-layout/util.d.ts +4 -2
  86. package/es/ele-pro-layout/util.js +20 -17
  87. package/es/ele-pro-table/components/table-view.d.ts +9 -3
  88. package/es/ele-pro-table/components/table-view.js +27 -24
  89. package/es/ele-pro-table/components/tool-column.d.ts +2 -1
  90. package/es/ele-pro-table/components/tool-column.js +26 -18
  91. package/es/ele-pro-table/index.d.ts +46 -25
  92. package/es/ele-pro-table/index.js +182 -196
  93. package/es/ele-pro-table/props.d.ts +27 -15
  94. package/es/ele-pro-table/props.js +15 -3
  95. package/es/ele-pro-table/style/index.js +1 -1
  96. package/es/ele-pro-table/style/index.scss +64 -8
  97. package/es/ele-pro-table/types/index.d.ts +39 -5
  98. package/es/ele-pro-table/util.d.ts +84 -49
  99. package/es/ele-pro-table/util.js +193 -78
  100. package/es/ele-qr-code/index.d.ts +3 -3
  101. package/es/ele-qr-code/props.d.ts +1 -2
  102. package/es/ele-qr-code-svg/index.d.ts +3 -3
  103. package/es/ele-split-panel/index.d.ts +6 -6
  104. package/es/ele-split-panel/props.d.ts +3 -4
  105. package/es/ele-table/style/index.scss +1 -0
  106. package/es/ele-tabs/index.js +3 -3
  107. package/es/ele-tabs/types/index.d.ts +3 -0
  108. package/es/ele-text/index.d.ts +3 -3
  109. package/es/ele-text/props.d.ts +2 -2
  110. package/es/ele-toolbar/index.d.ts +6 -6
  111. package/es/ele-toolbar/props.d.ts +3 -4
  112. package/es/ele-tooltip/index.d.ts +3 -3
  113. package/es/ele-tooltip/props.d.ts +1 -2
  114. package/es/ele-tour/index.d.ts +2 -3
  115. package/es/ele-tour/style/index.scss +1 -1
  116. package/es/ele-tour/util.js +3 -3
  117. package/es/ele-upload-list/index.d.ts +8 -7
  118. package/es/ele-upload-list/index.js +18 -11
  119. package/es/ele-upload-list/props.d.ts +4 -4
  120. package/es/ele-upload-list/props.js +1 -1
  121. package/es/ele-watermark/index.d.ts +16 -8
  122. package/es/ele-watermark/index.js +18 -12
  123. package/es/ele-watermark/props.d.ts +3 -1
  124. package/es/ele-watermark/props.js +5 -1
  125. package/es/ele-watermark/util.js +1 -1
  126. package/es/style/index.scss +1 -0
  127. package/es/style/nprogress.scss +2 -2
  128. package/es/style/themes/default.scss +36 -12
  129. package/es/style/themes/rounded.scss +4 -2
  130. package/es/style/themes/theme-util.scss +2 -0
  131. package/es/utils/core.d.ts +1 -1
  132. package/es/utils/core.js +17 -15
  133. package/es/utils/resolvers.js +2 -2
  134. package/lib/ele-alert/index.d.ts +10 -10
  135. package/lib/ele-alert/props.d.ts +6 -6
  136. package/lib/ele-app/style/message.scss +1 -0
  137. package/lib/ele-app/style/overwrite.scss +79 -3
  138. package/lib/ele-app/types/index.d.ts +7 -6
  139. package/lib/ele-avatar-group/index.d.ts +7 -8
  140. package/lib/ele-avatar-group/props.d.ts +3 -4
  141. package/lib/ele-basic-select/style/index.scss +4 -6
  142. package/lib/ele-bottom-bar/index.d.ts +4 -4
  143. package/lib/ele-bottom-bar/props.d.ts +2 -3
  144. package/lib/ele-card/index.d.ts +6 -6
  145. package/lib/ele-card/props.d.ts +3 -4
  146. package/lib/ele-check-card/components/card-item.d.ts +2 -3
  147. package/lib/ele-check-card/index.d.ts +4 -4
  148. package/lib/ele-check-card/props.d.ts +3 -3
  149. package/lib/ele-config-provider/receiver.d.ts +1 -1
  150. package/lib/ele-config-provider/receiver.js +2 -2
  151. package/lib/ele-copyable/index.d.ts +8 -8
  152. package/lib/ele-copyable/index.js +4 -3
  153. package/lib/ele-copyable/props.d.ts +5 -5
  154. package/lib/ele-copyable/style/index.scss +4 -0
  155. package/lib/ele-cropper/index.js +2 -2
  156. package/lib/ele-dashboard/index.d.ts +1 -2
  157. package/lib/ele-drawer/index.d.ts +16 -10
  158. package/lib/ele-drawer/props.d.ts +7 -6
  159. package/lib/ele-dropdown/index.d.ts +2 -2
  160. package/lib/ele-dropdown/props.d.ts +1 -2
  161. package/lib/ele-edit-tag/index.d.ts +4 -4
  162. package/lib/ele-edit-tag/props.d.ts +2 -3
  163. package/lib/ele-ellipsis/index.d.ts +4 -5
  164. package/lib/ele-ellipsis/props.d.ts +1 -1
  165. package/lib/ele-ellipsis/style/index.scss +4 -0
  166. package/lib/ele-file-list/index.d.ts +2 -7
  167. package/lib/ele-file-list/index.js +2 -2
  168. package/lib/ele-file-list/types/index.d.ts +0 -4
  169. package/lib/ele-icon-select/components/icon-grid.d.ts +5 -5
  170. package/lib/ele-icon-select/components/icon-popper.d.ts +15 -15
  171. package/lib/ele-icon-select/index.d.ts +15 -16
  172. package/lib/ele-icon-select/props.d.ts +8 -8
  173. package/lib/ele-loading/index.d.ts +26 -1
  174. package/lib/ele-loading/index.js +52 -10
  175. package/lib/ele-loading/props.d.ts +11 -1
  176. package/lib/ele-loading/props.js +16 -1
  177. package/lib/ele-loading/style/css-var.scss +7 -0
  178. package/lib/ele-loading/style/index.js +1 -0
  179. package/lib/ele-loading/style/index.scss +90 -0
  180. package/lib/ele-loading/types/index.d.ts +17 -0
  181. package/lib/ele-map-picker/components/map-view.d.ts +2 -2
  182. package/lib/ele-map-picker/index.d.ts +2 -2
  183. package/lib/ele-map-picker/props.d.ts +3 -3
  184. package/lib/ele-menus/index.d.ts +2 -0
  185. package/lib/ele-menus/index.js +9 -3
  186. package/lib/ele-menus/props.d.ts +10 -0
  187. package/lib/ele-menus/props.js +6 -0
  188. package/lib/ele-menus/style/index.scss +18 -18
  189. package/lib/ele-menus/types/index.d.ts +4 -0
  190. package/lib/ele-menus/util.d.ts +4 -3
  191. package/lib/ele-menus/util.js +23 -12
  192. package/lib/ele-modal/index.d.ts +19 -13
  193. package/lib/ele-modal/props.d.ts +8 -7
  194. package/lib/ele-modal/util.js +2 -2
  195. package/lib/ele-pagination/index.d.ts +1 -1
  196. package/lib/ele-popconfirm/index.d.ts +10 -10
  197. package/lib/ele-popconfirm/index.js +8 -2
  198. package/lib/ele-popconfirm/props.d.ts +6 -6
  199. package/lib/ele-popover/index.d.ts +6 -6
  200. package/lib/ele-popover/props.d.ts +3 -4
  201. package/lib/ele-printer/index.d.ts +6 -6
  202. package/lib/ele-printer/props.d.ts +3 -4
  203. package/lib/ele-pro-layout/components/pro-header.d.ts +7 -2
  204. package/lib/ele-pro-layout/components/pro-header.js +15 -5
  205. package/lib/ele-pro-layout/components/pro-iframe.js +10 -7
  206. package/lib/ele-pro-layout/components/pro-sidebar.d.ts +7 -2
  207. package/lib/ele-pro-layout/components/pro-sidebar.js +14 -5
  208. package/lib/ele-pro-layout/components/pro-sidebox.d.ts +11 -4
  209. package/lib/ele-pro-layout/components/pro-sidebox.js +16 -5
  210. package/lib/ele-pro-layout/components/tab-dropdown.js +1 -4
  211. package/lib/ele-pro-layout/index.d.ts +17 -3
  212. package/lib/ele-pro-layout/index.js +205 -102
  213. package/lib/ele-pro-layout/props.d.ts +6 -1
  214. package/lib/ele-pro-layout/props.js +10 -0
  215. package/lib/ele-pro-layout/style/collapse.scss +9 -10
  216. package/lib/ele-pro-layout/style/index.js +0 -1
  217. package/lib/ele-pro-layout/types/index.d.ts +9 -0
  218. package/lib/ele-pro-layout/util.d.ts +4 -2
  219. package/lib/ele-pro-layout/util.js +19 -16
  220. package/lib/ele-pro-table/components/table-view.d.ts +9 -3
  221. package/lib/ele-pro-table/components/table-view.js +25 -22
  222. package/lib/ele-pro-table/components/tool-column.d.ts +2 -1
  223. package/lib/ele-pro-table/components/tool-column.js +25 -17
  224. package/lib/ele-pro-table/index.d.ts +46 -25
  225. package/lib/ele-pro-table/index.js +180 -194
  226. package/lib/ele-pro-table/props.d.ts +27 -15
  227. package/lib/ele-pro-table/props.js +15 -3
  228. package/lib/ele-pro-table/style/index.js +1 -1
  229. package/lib/ele-pro-table/style/index.scss +64 -8
  230. package/lib/ele-pro-table/types/index.d.ts +39 -5
  231. package/lib/ele-pro-table/util.d.ts +84 -49
  232. package/lib/ele-pro-table/util.js +192 -77
  233. package/lib/ele-qr-code/index.d.ts +3 -3
  234. package/lib/ele-qr-code/props.d.ts +1 -2
  235. package/lib/ele-qr-code-svg/index.d.ts +3 -3
  236. package/lib/ele-split-panel/index.d.ts +6 -6
  237. package/lib/ele-split-panel/props.d.ts +3 -4
  238. package/lib/ele-table/style/index.scss +1 -0
  239. package/lib/ele-tabs/index.js +3 -3
  240. package/lib/ele-tabs/types/index.d.ts +3 -0
  241. package/lib/ele-text/index.d.ts +3 -3
  242. package/lib/ele-text/props.d.ts +2 -2
  243. package/lib/ele-toolbar/index.d.ts +6 -6
  244. package/lib/ele-toolbar/props.d.ts +3 -4
  245. package/lib/ele-tooltip/index.d.ts +3 -3
  246. package/lib/ele-tooltip/props.d.ts +1 -2
  247. package/lib/ele-tour/index.d.ts +2 -3
  248. package/lib/ele-tour/style/index.scss +1 -1
  249. package/lib/ele-tour/util.js +3 -3
  250. package/lib/ele-upload-list/index.d.ts +8 -7
  251. package/lib/ele-upload-list/index.js +17 -10
  252. package/lib/ele-upload-list/props.d.ts +4 -4
  253. package/lib/ele-upload-list/props.js +1 -1
  254. package/lib/ele-watermark/index.d.ts +16 -8
  255. package/lib/ele-watermark/index.js +17 -11
  256. package/lib/ele-watermark/props.d.ts +3 -1
  257. package/lib/ele-watermark/props.js +5 -1
  258. package/lib/ele-watermark/util.js +1 -1
  259. package/lib/style/index.scss +1 -0
  260. package/lib/style/nprogress.scss +2 -2
  261. package/lib/style/themes/default.scss +36 -12
  262. package/lib/style/themes/rounded.scss +4 -2
  263. package/lib/style/themes/theme-util.scss +2 -0
  264. package/lib/utils/core.d.ts +1 -1
  265. package/lib/utils/core.js +17 -15
  266. package/lib/utils/resolvers.js +2 -2
  267. package/package.json +26 -24
  268. package/es/ele-alert/types/index.d.ts +0 -0
  269. package/lib/ele-alert/types/index.d.ts +0 -0
@@ -4,7 +4,7 @@ const vueRouter = require("vue-router");
4
4
  const elementPlus = require("element-plus");
5
5
  const core = require("../utils/core");
6
6
  const receiver = require("../ele-config-provider/receiver");
7
- const EleAlert = require("../ele-alert/index");
7
+ const EleWatermark = require("../ele-watermark/index");
8
8
  const ProHeader = require("./components/pro-header");
9
9
  const ProSidebar = require("./components/pro-sidebar");
10
10
  const ProSidebox = require("./components/pro-sidebox");
@@ -16,7 +16,7 @@ const _sfc_main = vue.defineComponent({
16
16
  name: "EleProLayout",
17
17
  components: {
18
18
  ElBacktop: elementPlus.ElBacktop,
19
- EleAlert,
19
+ EleWatermark,
20
20
  ProHeader,
21
21
  ProSidebar,
22
22
  ProSidebox,
@@ -27,7 +27,7 @@ const _sfc_main = vue.defineComponent({
27
27
  emits: props.proLayoutEmits,
28
28
  setup(props2, { emit }) {
29
29
  const { authenticated } = receiver.useLicense();
30
- const { currentRoute } = vueRouter.useRouter();
30
+ const { currentRoute, push } = vueRouter.useRouter();
31
31
  const { disableTransition } = util.useDisableTransition();
32
32
  const contentRef = vue.ref(null);
33
33
  const levelData = vue.shallowRef([]);
@@ -46,6 +46,7 @@ const _sfc_main = vue.defineComponent({
46
46
  const homeMenuPath = vue.ref(util.getHomePath(props2.homePath));
47
47
  const isHome = vue.ref(false);
48
48
  const mobile = vue.ref(false);
49
+ const watermark = vue.ref(receiver.UNAUTHORIZED_TIP.split(",") || "Error");
49
50
  const topLayout = vue.computed(() => props2.layout === "top");
50
51
  const mixLayout = vue.computed(() => props2.layout === "mix");
51
52
  const mixSidebar = vue.computed(() => props2.sidebarLayout === "mix");
@@ -65,6 +66,7 @@ const _sfc_main = vue.defineComponent({
65
66
  const hasSide = sidebox.value || sidebar.value;
66
67
  const fixedSide = props2.fixedSidebar && !props2.fixedBody && hasSide;
67
68
  const logoAuto = props2.logoInHeader || topLayout.value || !hasSide;
69
+ const hasMix = mixSidebar.value && sidebox.value;
68
70
  return [
69
71
  "ele-admin-layout",
70
72
  // 折叠侧栏
@@ -72,7 +74,9 @@ const _sfc_main = vue.defineComponent({
72
74
  // 双侧栏折叠一级
73
75
  { "ele-admin-compact": props2.compact && sidebox.value },
74
76
  // 双侧栏
75
- { "ele-admin-mix-sidebar": mixSidebar.value && sidebox.value },
77
+ { "ele-admin-mix-sidebar": hasMix },
78
+ // 双侧栏时侧栏空数据
79
+ { "ele-admin-none-sidebar": hasMix && !sidebar.value },
76
80
  // 固定顶栏
77
81
  { "ele-admin-fixed-header": props2.fixedHeader && !props2.fixedBody },
78
82
  // 固定侧栏
@@ -97,6 +101,15 @@ const _sfc_main = vue.defineComponent({
97
101
  { "ele-admin-mobile": mobile.value }
98
102
  ];
99
103
  });
104
+ const backTopSelector = vue.computed(() => {
105
+ if (props2.backTopTarget) {
106
+ return props2.backTopTarget;
107
+ }
108
+ if (props2.fixedBody) {
109
+ return ".ele-admin-layout.ele-admin-fixed-body>.ele-admin-main>.ele-admin-body>.ele-admin-content";
110
+ }
111
+ return void 0;
112
+ });
100
113
  const sidebarCollapse = vue.computed(() => {
101
114
  return mobile.value || mixSidebar.value ? false : props2.collapse;
102
115
  });
@@ -225,7 +238,8 @@ const _sfc_main = vue.defineComponent({
225
238
  path: d.path,
226
239
  component: d.component,
227
240
  redirect: d.redirect,
228
- meta: d.meta
241
+ meta: d.meta,
242
+ tempChildren: d.children
229
243
  };
230
244
  });
231
245
  const childMenus = util.getActiveChilds(
@@ -323,6 +337,90 @@ const _sfc_main = vue.defineComponent({
323
337
  });
324
338
  }
325
339
  };
340
+ const onNavItemClick = (item) => {
341
+ if (!item.index || props2.navTrigger != "click") {
342
+ return;
343
+ }
344
+ if (props2.beforeClick && props2.beforeClick(item) === false) {
345
+ return;
346
+ }
347
+ if (core.isExternalLink(item.index)) {
348
+ window.open(item.index);
349
+ return;
350
+ }
351
+ headerActive.value = item.index;
352
+ const temp = util.getActiveChilds(
353
+ headerData.value,
354
+ headerActive.value,
355
+ "tempChildren"
356
+ );
357
+ const isChild = !temp.some((d) => {
358
+ var _a;
359
+ return !((_a = d.meta) == null ? void 0 : _a.hide);
360
+ });
361
+ if (isChild && item.index !== vue.unref(currentRoute).fullPath) {
362
+ push(item.index);
363
+ return;
364
+ }
365
+ if (mixSidebar.value) {
366
+ sideboxData.value = temp.map((d) => {
367
+ return {
368
+ name: d.name,
369
+ path: d.path,
370
+ component: d.component,
371
+ redirect: d.redirect,
372
+ meta: d.meta,
373
+ children: props2.collapse ? d.children : void 0,
374
+ tempChildren: d.children
375
+ };
376
+ });
377
+ return;
378
+ }
379
+ sidebarData.value = temp;
380
+ };
381
+ const onBoxItemClick = (item) => {
382
+ if (!item.index || props2.boxTrigger != "click") {
383
+ return;
384
+ }
385
+ if (props2.beforeClick && props2.beforeClick(item) === false) {
386
+ return;
387
+ }
388
+ if (core.isExternalLink(item.index)) {
389
+ window.open(item.index);
390
+ return;
391
+ }
392
+ sideboxActive.value = item.index;
393
+ const temp = util.getActiveChilds(
394
+ sideboxData.value,
395
+ sideboxActive.value,
396
+ "tempChildren"
397
+ );
398
+ const isChild = !temp.some((d) => {
399
+ var _a;
400
+ return !((_a = d.meta) == null ? void 0 : _a.hide);
401
+ });
402
+ if (isChild && item.index !== vue.unref(currentRoute).fullPath) {
403
+ push(item.index);
404
+ return;
405
+ }
406
+ sidebarData.value = temp;
407
+ };
408
+ const onMenuItemClick = (item) => {
409
+ if (!item.index || props2.itemTrigger != "click") {
410
+ return;
411
+ }
412
+ if (props2.beforeClick && props2.beforeClick(item) === false) {
413
+ return;
414
+ }
415
+ if (core.isExternalLink(item.index)) {
416
+ window.open(item.index);
417
+ return;
418
+ }
419
+ sidebarActive.value = item.index;
420
+ if (item.index !== vue.unref(currentRoute).fullPath) {
421
+ push(item.index);
422
+ }
423
+ };
326
424
  vue.watch(
327
425
  () => props2.menus,
328
426
  () => {
@@ -447,8 +545,8 @@ const _sfc_main = vue.defineComponent({
447
545
  });
448
546
  vue.provide(receiver.LAYOUT_KEY, layoutProvide);
449
547
  return {
450
- UNAUTHORIZED_TIP: receiver.UNAUTHORIZED_TIP,
451
548
  authenticated,
549
+ watermark,
452
550
  contentRef,
453
551
  levelData,
454
552
  tabData,
@@ -465,6 +563,7 @@ const _sfc_main = vue.defineComponent({
465
563
  sidebox,
466
564
  sidebar,
467
565
  layoutClass,
566
+ backTopSelector,
468
567
  sidebarCollapse,
469
568
  sidebarTheme,
470
569
  updateCollapse,
@@ -476,7 +575,10 @@ const _sfc_main = vue.defineComponent({
476
575
  onSideMenuOpen,
477
576
  onSideMenuClose,
478
577
  onHeadMenuOpen,
479
- onHeadMenuClose
578
+ onHeadMenuClose,
579
+ onNavItemClick,
580
+ onBoxItemClick,
581
+ onMenuItemClick
480
582
  };
481
583
  }
482
584
  });
@@ -487,25 +589,18 @@ const _export_sfc = (sfc, props2) => {
487
589
  }
488
590
  return target;
489
591
  };
490
- const _hoisted_1 = { class: "ele-admin-main" };
491
- const _hoisted_2 = { class: "ele-admin-body" };
492
- const _hoisted_3 = {
493
- key: 1,
592
+ const _hoisted_1 = { class: "ele-admin-body" };
593
+ const _hoisted_2 = {
494
594
  ref: "contentRef",
495
595
  class: "ele-admin-content"
496
596
  };
497
- const _hoisted_4 = {
498
- key: 2,
499
- class: "ele-admin-content",
500
- style: { "padding": "16px" }
501
- };
502
597
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
503
598
  const _component_ProHeader = vue.resolveComponent("ProHeader");
504
599
  const _component_ProSidebox = vue.resolveComponent("ProSidebox");
505
600
  const _component_ProSidebar = vue.resolveComponent("ProSidebar");
506
601
  const _component_ProTabs = vue.resolveComponent("ProTabs");
507
602
  const _component_ProIframe = vue.resolveComponent("ProIframe");
508
- const _component_EleAlert = vue.resolveComponent("EleAlert");
603
+ const _component_EleWatermark = vue.resolveComponent("EleWatermark");
509
604
  const _component_ElBacktop = vue.resolveComponent("ElBacktop");
510
605
  return vue.openBlock(), vue.createElementBlock("div", {
511
606
  class: vue.normalizeClass(_ctx.layoutClass)
@@ -517,6 +612,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
517
612
  ellipsis: _ctx.ellipsis,
518
613
  ellipsisProps: _ctx.ellipsisProps,
519
614
  menuTrigger: _ctx.menuTrigger,
615
+ itemTrigger: _ctx.navTrigger,
520
616
  collapse: _ctx.collapse,
521
617
  sidebar: _ctx.sidebar,
522
618
  titleSlot: _ctx.headerTitleSlot,
@@ -528,7 +624,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
528
624
  isHome: _ctx.isHome,
529
625
  onLogoClick: _ctx.onLogoClick,
530
626
  onOpen: _ctx.onHeadMenuOpen,
531
- onClsoe: _ctx.onHeadMenuClose
627
+ onClsoe: _ctx.onHeadMenuClose,
628
+ onItemClick: _ctx.onNavItemClick
532
629
  }, vue.createSlots({ _: 2 }, [
533
630
  vue.renderList(Object.keys(_ctx.$slots), (name) => {
534
631
  return {
@@ -538,69 +635,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
538
635
  ])
539
636
  };
540
637
  })
541
- ]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe"]),
542
- vue.createElementVNode("div", _hoisted_1, [
543
- _ctx.sidebox ? (vue.openBlock(), vue.createBlock(_component_ProSidebox, {
544
- key: 0,
545
- menus: _ctx.sideboxData,
546
- sidebarStyle: _ctx.sidebarStyle,
547
- colorfulIcon: _ctx.colorfulIcon,
548
- active: _ctx.collapse ? _ctx.sidebarActive : _ctx.sideboxActive,
549
- compact: _ctx.compact,
550
- collapse: _ctx.collapse,
551
- popperEffect: _ctx.tooltipEffect,
552
- titleSlot: _ctx.sideboxTitleSlot,
553
- iconSlot: _ctx.sideboxIconSlot
554
- }, vue.createSlots({ _: 2 }, [
555
- vue.renderList(Object.keys(_ctx.$slots), (name) => {
556
- return {
557
- name,
558
- fn: vue.withCtx((slotProps) => [
559
- vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
560
- ])
561
- };
562
- })
563
- ]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "compact", "collapse", "popperEffect", "titleSlot", "iconSlot"])) : vue.createCommentVNode("", true),
564
- _ctx.sidebar ? (vue.openBlock(), vue.createBlock(_component_ProSidebar, {
565
- key: 1,
566
- menus: _ctx.authenticated ? _ctx.sidebarData : [],
567
- sidebarStyle: _ctx.sidebarTheme,
568
- colorfulIcon: _ctx.colorfulIcon,
569
- active: _ctx.sidebarActive,
570
- collapse: _ctx.sidebarCollapse,
571
- uniqueOpened: _ctx.uniqueOpened,
572
- defaultOpeneds: _ctx.sidebarOpeneds,
573
- popperEffect: _ctx.tooltipEffect,
574
- titleSlot: _ctx.sidebarTitleSlot,
575
- iconSlot: _ctx.sidebarIconSlot,
576
- onOpen: _ctx.onSideMenuOpen,
577
- onClsoe: _ctx.onSideMenuClose
578
- }, vue.createSlots({ _: 2 }, [
579
- vue.renderList(Object.keys(_ctx.$slots), (name) => {
580
- return {
581
- name,
582
- fn: vue.withCtx((slotProps) => [
583
- vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
584
- ])
585
- };
586
- })
587
- ]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "collapse", "uniqueOpened", "defaultOpeneds", "popperEffect", "titleSlot", "iconSlot", "onOpen", "onClsoe"])) : vue.createCommentVNode("", true),
588
- vue.createElementVNode("div", _hoisted_2, [
589
- _ctx.authenticated && _ctx.tabBar ? (vue.openBlock(), vue.createBlock(_component_ProTabs, {
638
+ ]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "itemTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe", "onItemClick"]),
639
+ vue.createVNode(_component_EleWatermark, {
640
+ fixed: true,
641
+ height: 68,
642
+ content: _ctx.watermark,
643
+ disabled: _ctx.authenticated,
644
+ class: "ele-admin-main"
645
+ }, {
646
+ default: vue.withCtx(() => [
647
+ _ctx.sidebox ? (vue.openBlock(), vue.createBlock(_component_ProSidebox, {
590
648
  key: 0,
591
- tabs: _ctx.tabData,
592
- active: _ctx.tabActive,
593
- tabStyle: _ctx.tabStyle,
594
- fixedHome: _ctx.fixedHome,
595
- homePath: _ctx.homeMenuPath,
596
- isHome: _ctx.isHome,
597
- tabContextMenu: _ctx.tabContextMenu,
598
- tabContextMenus: _ctx.tabContextMenus,
599
- tabSortable: _ctx.tabSortable,
600
- onTabClick: _ctx.onTabClick,
601
- onTabRemove: _ctx.onTabRemove,
602
- onTabContextMenu: _ctx.onTabContextMenu,
603
- onTabSortChange: _ctx.onTabSortChange
649
+ menus: _ctx.sideboxData,
650
+ sidebarStyle: _ctx.sidebarStyle,
651
+ colorfulIcon: _ctx.colorfulIcon,
652
+ active: _ctx.collapse ? _ctx.sidebarActive : _ctx.sideboxActive,
653
+ compact: _ctx.compact,
654
+ collapse: _ctx.collapse,
655
+ popperEffect: _ctx.tooltipEffect,
656
+ itemTrigger: _ctx.boxTrigger,
657
+ titleSlot: _ctx.sideboxTitleSlot,
658
+ iconSlot: _ctx.sideboxIconSlot,
659
+ onItemClick: _ctx.onBoxItemClick
660
+ }, vue.createSlots({ _: 2 }, [
661
+ vue.renderList(Object.keys(_ctx.$slots), (name) => {
662
+ return {
663
+ name,
664
+ fn: vue.withCtx((slotProps) => [
665
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
666
+ ])
667
+ };
668
+ })
669
+ ]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "compact", "collapse", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onItemClick"])) : vue.createCommentVNode("", true),
670
+ _ctx.sidebar ? (vue.openBlock(), vue.createBlock(_component_ProSidebar, {
671
+ key: 1,
672
+ menus: _ctx.sidebarData,
673
+ sidebarStyle: _ctx.sidebarTheme,
674
+ colorfulIcon: _ctx.colorfulIcon,
675
+ active: _ctx.sidebarActive,
676
+ collapse: _ctx.sidebarCollapse,
677
+ uniqueOpened: _ctx.uniqueOpened,
678
+ defaultOpeneds: _ctx.sidebarOpeneds,
679
+ popperEffect: _ctx.tooltipEffect,
680
+ itemTrigger: _ctx.itemTrigger,
681
+ titleSlot: _ctx.sidebarTitleSlot,
682
+ iconSlot: _ctx.sidebarIconSlot,
683
+ onOpen: _ctx.onSideMenuOpen,
684
+ onClsoe: _ctx.onSideMenuClose,
685
+ onItemClick: _ctx.onMenuItemClick
604
686
  }, vue.createSlots({ _: 2 }, [
605
687
  vue.renderList(Object.keys(_ctx.$slots), (name) => {
606
688
  return {
@@ -610,28 +692,49 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
610
692
  ])
611
693
  };
612
694
  })
613
- ]), 1032, ["tabs", "active", "tabStyle", "fixedHome", "homePath", "isHome", "tabContextMenu", "tabContextMenus", "tabSortable", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"])) : vue.createCommentVNode("", true),
614
- _ctx.authenticated ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
615
- _ctx.tabBar && _ctx.keepAlive ? (vue.openBlock(), vue.createBlock(_component_ProIframe, {
695
+ ]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "collapse", "uniqueOpened", "defaultOpeneds", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onOpen", "onClsoe", "onItemClick"])) : vue.createCommentVNode("", true),
696
+ vue.createElementVNode("div", _hoisted_1, [
697
+ _ctx.tabBar ? (vue.openBlock(), vue.createBlock(_component_ProTabs, {
616
698
  key: 0,
617
- keepAlive: _ctx.keepAlive,
618
- transitionName: _ctx.transitionName,
619
- transitionDelay: _ctx.transitionDelay,
620
- tabData: _ctx.tabData,
621
- tabActive: _ctx.tabActive
622
- }, null, 8, ["keepAlive", "transitionName", "transitionDelay", "tabData", "tabActive"])) : vue.createCommentVNode("", true),
623
- vue.renderSlot(_ctx.$slots, "default"),
624
- !_ctx.hideFooter ? vue.renderSlot(_ctx.$slots, "footer", { key: 1 }) : vue.createCommentVNode("", true)
625
- ], 512)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
626
- vue.createVNode(_component_EleAlert, {
627
- type: "warning",
628
- showIcon: true,
629
- closable: false,
630
- title: _ctx.UNAUTHORIZED_TIP
631
- }, null, 8, ["title"])
632
- ]))
633
- ])
634
- ]),
699
+ tabs: _ctx.tabData,
700
+ active: _ctx.tabActive,
701
+ tabStyle: _ctx.tabStyle,
702
+ fixedHome: _ctx.fixedHome,
703
+ homePath: _ctx.homeMenuPath,
704
+ isHome: _ctx.isHome,
705
+ tabContextMenu: _ctx.tabContextMenu,
706
+ tabContextMenus: _ctx.tabContextMenus,
707
+ tabSortable: _ctx.tabSortable,
708
+ onTabClick: _ctx.onTabClick,
709
+ onTabRemove: _ctx.onTabRemove,
710
+ onTabContextMenu: _ctx.onTabContextMenu,
711
+ onTabSortChange: _ctx.onTabSortChange
712
+ }, vue.createSlots({ _: 2 }, [
713
+ vue.renderList(Object.keys(_ctx.$slots), (name) => {
714
+ return {
715
+ name,
716
+ fn: vue.withCtx((slotProps) => [
717
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
718
+ ])
719
+ };
720
+ })
721
+ ]), 1032, ["tabs", "active", "tabStyle", "fixedHome", "homePath", "isHome", "tabContextMenu", "tabContextMenus", "tabSortable", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"])) : vue.createCommentVNode("", true),
722
+ vue.createElementVNode("div", _hoisted_2, [
723
+ _ctx.tabBar && _ctx.keepAlive ? (vue.openBlock(), vue.createBlock(_component_ProIframe, {
724
+ key: 0,
725
+ keepAlive: _ctx.keepAlive,
726
+ transitionName: _ctx.transitionName,
727
+ transitionDelay: _ctx.transitionDelay,
728
+ tabData: _ctx.tabData,
729
+ tabActive: _ctx.tabActive
730
+ }, null, 8, ["keepAlive", "transitionName", "transitionDelay", "tabData", "tabActive"])) : vue.createCommentVNode("", true),
731
+ vue.renderSlot(_ctx.$slots, "default"),
732
+ !_ctx.hideFooter ? vue.renderSlot(_ctx.$slots, "footer", { key: 1 }) : vue.createCommentVNode("", true)
733
+ ], 512)
734
+ ])
735
+ ]),
736
+ _: 3
737
+ }, 8, ["content", "disabled"]),
635
738
  vue.createElementVNode("div", {
636
739
  class: "ele-admin-mask",
637
740
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.updateCollapse && _ctx.updateCollapse(...args))
@@ -641,7 +744,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
641
744
  right: _ctx.backTopRight,
642
745
  bottom: _ctx.backTopBottom,
643
746
  visibilityHeight: _ctx.backTopVisibilityHeight,
644
- target: _ctx.fixedBody ? ".ele-admin-layout .ele-admin-content" : void 0
747
+ target: _ctx.backTopSelector
645
748
  }, null, 8, ["right", "bottom", "visibilityHeight", "target"])) : vue.createCommentVNode("", true)
646
749
  ], 2);
647
750
  }
@@ -2,7 +2,7 @@ import type { PropType, ExtractPropTypes } from 'vue';
2
2
  import type { EllipsisProps } from '../ele-menus/types';
3
3
  import type { ContextMenus } from '../ele-tabs/types';
4
4
  import type { EleDropdownProps } from '../ele-file-list/types';
5
- import type { MenuItem, TabItem, Layout, SidebarLayout, HeaderStyle, SidebarStyle, TabStyle, MenuI18n, TabItemEventOption, BodySizeChangeOption } from './types';
5
+ import type { MenuItem, TabItem, Layout, SidebarLayout, HeaderStyle, SidebarStyle, TabStyle, MenuI18n, TabItemEventOption, BodySizeChangeOption, MenuItemTrigger, BeforeClick } from './types';
6
6
  /**
7
7
  * 属性
8
8
  */
@@ -40,6 +40,7 @@ export declare const proLayoutProps: {
40
40
  type: NumberConstructor;
41
41
  default: number;
42
42
  };
43
+ backTopTarget: StringConstructor;
43
44
  ellipsis: {
44
45
  type: BooleanConstructor;
45
46
  default: boolean;
@@ -131,6 +132,10 @@ export declare const proLayoutProps: {
131
132
  default: string;
132
133
  };
133
134
  tooltipEffect: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "light" | "dark", unknown> | undefined>;
135
+ navTrigger: PropType<MenuItemTrigger>;
136
+ boxTrigger: PropType<MenuItemTrigger>;
137
+ itemTrigger: PropType<MenuItemTrigger>;
138
+ beforeClick: PropType<BeforeClick>;
134
139
  keepAlive: BooleanConstructor;
135
140
  transitionName: StringConstructor;
136
141
  transitionDelay: {
@@ -46,6 +46,8 @@ const proLayoutProps = {
46
46
  type: Number,
47
47
  default: 60
48
48
  },
49
+ // 返回顶部的目标选择器
50
+ backTopTarget: String,
49
51
  // 顶栏菜单是否省略多余的子项
50
52
  ellipsis: {
51
53
  type: Boolean,
@@ -171,6 +173,14 @@ const proLayoutProps = {
171
173
  },
172
174
  // 菜单 tooltip 主题
173
175
  tooltipEffect: String,
176
+ // 顶栏菜单触发模式
177
+ navTrigger: String,
178
+ // 双侧栏一级菜单触发模式
179
+ boxTrigger: String,
180
+ // 侧栏菜单触发模式
181
+ itemTrigger: String,
182
+ // 菜单点击事件前钩子
183
+ beforeClick: Function,
174
184
  // 是否支持内链缓存
175
185
  keepAlive: Boolean,
176
186
  // 内链切换动画
@@ -19,21 +19,20 @@
19
19
  }
20
20
  }
21
21
 
22
- &.ele-admin-mix-sidebar {
23
- .ele-admin-sidebox {
24
- box-shadow: eleVar('sidebar', 'shadow');
25
- }
26
-
27
- .ele-admin-sidebar {
28
- width: 0;
22
+ &.ele-admin-mix-sidebar .ele-admin-sidebar {
23
+ width: 0;
29
24
 
30
- & + .ele-admin-body {
31
- width: calc(100% - #{eleVar('sidebox', 'width')});
32
- }
25
+ & + .ele-admin-body {
26
+ width: calc(100% - #{eleVar('sidebox', 'width')});
33
27
  }
34
28
  }
35
29
  }
36
30
 
31
+ .ele-admin-collapse.ele-admin-mix-sidebar .ele-admin-sidebox,
32
+ .ele-admin-none-sidebar.ele-admin-mix-sidebar .ele-admin-sidebox {
33
+ box-shadow: eleVar('sidebar', 'shadow');
34
+ }
35
+
37
36
  /* 折叠一级侧栏 */
38
37
  .ele-admin-compact.ele-admin-mix-sidebar {
39
38
  $collapseW: eleVar('sidebar', 'collapse-width');
@@ -2,7 +2,6 @@
2
2
  require("element-plus/es/components/backtop/style/index");
3
3
  require("element-plus/es/components/icon/style/index");
4
4
  require("element-plus/es/components/scrollbar/style/index");
5
- require("../../ele-alert/style/index");
6
5
  require("../../ele-page/style/index");
7
6
  require("../../ele-breadcrumb/style/index");
8
7
  require("../../ele-menus/style/index");
@@ -204,6 +204,14 @@ export type MenuTrigger = ElMenuProps['menuTrigger'];
204
204
  * 面包屑导航分隔符
205
205
  */
206
206
  export type BreadcrumbSeparator = ElBreadcrumbProps['separatorIcon'];
207
+ /**
208
+ * 混合模式菜单切换模式
209
+ */
210
+ export type MenuItemTrigger = 'route' | 'click';
211
+ /**
212
+ * 菜单点击前钩子
213
+ */
214
+ export type BeforeClick = (item: MenuItemProps) => boolean;
207
215
  /**
208
216
  * 内链数据
209
217
  */
@@ -221,3 +229,4 @@ export type TabTitleInstance = InstanceType<typeof TabTitle> | null;
221
229
  * 标签页组件实例
222
230
  */
223
231
  export type EleTabsInstance = InstanceType<typeof EleTabs> | null;
232
+ export type { MenuItemProps };
@@ -72,8 +72,9 @@ export declare function getMixActive(matched?: MenuItem[]): MixActiveResult;
72
72
  * 获取选中菜单的子级
73
73
  * @param menus 菜单数据
74
74
  * @param active 选中地址
75
+ * @param childrenName 子级字段名称
75
76
  */
76
- export declare function getActiveChilds(menus: MenuItem[], active?: string): MenuItem[];
77
+ export declare function getActiveChilds(menus: MenuItem[], active?: string, childrenName?: string): MenuItem[];
77
78
  /**
78
79
  * 绑定窗口事件监听
79
80
  */
@@ -93,5 +94,6 @@ export declare function useDisableTransition(): {
93
94
  /**
94
95
  * 菜单数据转换
95
96
  * @param menus 菜单数据
97
+ * @param link 是否使用超链接
96
98
  */
97
- export declare function getMenuItems(menus: MenuItem[]): MenuItemProps[];
99
+ export declare function getMenuItems(menus: MenuItem[], link: boolean): MenuItemProps[];
@@ -67,15 +67,17 @@ function getMatchedMenus(path, menus, parents) {
67
67
  function getMatchedLevels(matched, activeOther, route, menus, tabs) {
68
68
  var _a;
69
69
  const levels = [];
70
- matched == null ? void 0 : matched.forEach((m) => {
71
- var _a2;
72
- if (m.meta && m.meta.title && m.meta.breadcrumb !== false) {
73
- levels.push({
74
- path: m.path,
75
- title: ((_a2 = findTabByPath(m.path, tabs)) == null ? void 0 : _a2.title) || m.meta.title
76
- });
77
- }
78
- });
70
+ if (matched) {
71
+ matched.forEach((m) => {
72
+ var _a2;
73
+ if (m.meta && m.meta.title && m.meta.breadcrumb !== false) {
74
+ levels.push({
75
+ path: m.path,
76
+ title: ((_a2 = findTabByPath(m.path, tabs)) == null ? void 0 : _a2.title) || m.meta.title
77
+ });
78
+ }
79
+ });
80
+ }
79
81
  if (activeOther) {
80
82
  const { path, fullPath, meta } = route;
81
83
  if ((!levels.length || fullPath !== levels[levels.length - 1].path) && meta.title) {
@@ -134,18 +136,19 @@ function getMixActive(matched) {
134
136
  active2: match2.path
135
137
  };
136
138
  }
137
- function getActiveChilds(menus, active) {
139
+ function getActiveChilds(menus, active, childrenName) {
140
+ const key = childrenName || "children";
138
141
  if (!menus.length) {
139
142
  return [];
140
143
  }
141
144
  if (!active) {
142
- return menus[0].children || [];
145
+ return menus[0][key] || [];
143
146
  }
144
147
  const temp = menus.find((m) => m.path === active);
145
148
  if (temp == null) {
146
- return menus[0].children || [];
149
+ return menus[0][key] || [];
147
150
  }
148
- return temp.children || [];
151
+ return temp[key] || [];
149
152
  }
150
153
  function useWindowListener(option, props) {
151
154
  const state = { timer: null };
@@ -244,7 +247,7 @@ function useDisableTransition() {
244
247
  });
245
248
  return { disableTransition };
246
249
  }
247
- function getMenuItems(menus) {
250
+ function getMenuItems(menus, link) {
248
251
  return core.mapTree(menus, (m) => {
249
252
  const { path, meta } = m;
250
253
  const { hide, icon, title, props } = meta ?? {};
@@ -254,9 +257,9 @@ function getMenuItems(menus) {
254
257
  const item = {
255
258
  title,
256
259
  icon,
257
- path,
260
+ path: link ? path : void 0,
258
261
  index: path,
259
- ...props,
262
+ ...core.omit(props, ["title", "icon", "path", "index"]),
260
263
  meta
261
264
  };
262
265
  return item;