@fmdeui/fmui 1.0.28 → 1.0.29

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 (186) hide show
  1. package/es/component.mjs +3 -1
  2. package/es/components/fm-layout/index.d.ts +32 -0
  3. package/es/components/fm-layout/src/component/aside.vue.d.ts +5 -0
  4. package/es/components/fm-layout/src/component/columnsAside.vue.d.ts +5 -0
  5. package/es/components/fm-layout/src/component/header.vue.d.ts +16 -0
  6. package/es/components/fm-layout/src/component/main.vue.d.ts +7 -0
  7. package/es/components/fm-layout/src/footer/index.vue.d.ts +3 -0
  8. package/es/components/fm-layout/src/index.vue.d.ts +22 -0
  9. package/es/components/fm-layout/src/logo/index.vue.d.ts +3 -0
  10. package/es/components/fm-layout/src/main/classic.vue.d.ts +18 -0
  11. package/es/components/fm-layout/src/main/columns.vue.d.ts +19 -0
  12. package/es/components/fm-layout/src/main/defaults.vue.d.ts +48 -0
  13. package/es/components/fm-layout/src/main/transverse.vue.d.ts +18 -0
  14. package/es/components/fm-layout/src/navBars/index.vue.d.ts +16 -0
  15. package/es/components/fm-layout/src/navBars/tagsView/contextmenu.vue.d.ts +28 -0
  16. package/es/components/fm-layout/src/navBars/tagsView/tagsView.vue.d.ts +45 -0
  17. package/es/components/fm-layout/src/navBars/topBar/breadcrumb.vue.d.ts +3 -0
  18. package/es/components/fm-layout/src/navBars/topBar/index.vue.d.ts +16 -0
  19. package/es/components/fm-layout/src/navBars/topBar/search.vue.d.ts +7 -0
  20. package/es/components/fm-layout/src/navBars/topBar/upgradeInfo.vue.d.ts +5 -0
  21. package/es/components/fm-layout/src/navBars/topBar/user.vue.d.ts +75 -0
  22. package/es/components/fm-layout/src/navBars/topBar/userNews.vue.d.ts +9 -0
  23. package/es/components/fm-layout/src/navMenu/horizontal.vue.d.ts +42 -0
  24. package/es/components/fm-layout/src/navMenu/subItem.vue.d.ts +42 -0
  25. package/es/components/fm-layout/src/navMenu/vertical.vue.d.ts +42 -0
  26. package/es/components/fm-layout/src/routerView/iframes.vue.d.ts +35 -0
  27. package/es/components/fm-layout/src/routerView/parent.vue.d.ts +3 -0
  28. package/es/components/fm-layout/src/type.d.ts +2 -0
  29. package/es/components/fm-layout/style/css.d.ts +0 -0
  30. package/es/components/fm-layout/style/index.d.ts +0 -0
  31. package/es/components/index.d.ts +1 -0
  32. package/es/packages/components/fm-layout/index.mjs +7 -0
  33. package/es/packages/components/fm-layout/src/component/aside.vue.mjs +5 -0
  34. package/es/packages/components/fm-layout/src/component/aside.vue2.mjs +175 -0
  35. package/es/packages/components/fm-layout/src/component/columnsAside.vue.mjs +5 -0
  36. package/es/packages/components/fm-layout/src/component/columnsAside.vue2.mjs +273 -0
  37. package/es/packages/components/fm-layout/src/component/header.vue.mjs +5 -0
  38. package/es/packages/components/fm-layout/src/component/header.vue2.mjs +50 -0
  39. package/es/packages/components/fm-layout/src/component/main.vue.mjs +5 -0
  40. package/es/packages/components/fm-layout/src/component/main.vue2.mjs +81 -0
  41. package/es/packages/components/fm-layout/src/footer/index.vue.mjs +5 -0
  42. package/es/packages/components/fm-layout/src/footer/index.vue2.mjs +29 -0
  43. package/es/packages/components/fm-layout/src/index.vue.mjs +5 -0
  44. package/es/packages/components/fm-layout/src/index.vue2.mjs +91 -0
  45. package/es/packages/components/fm-layout/src/logo/index.vue.mjs +5 -0
  46. package/es/packages/components/fm-layout/src/logo/index.vue2.mjs +57 -0
  47. package/es/packages/components/fm-layout/src/main/classic.vue.mjs +5 -0
  48. package/es/packages/components/fm-layout/src/main/classic.vue2.mjs +87 -0
  49. package/es/packages/components/fm-layout/src/main/columns.vue.mjs +5 -0
  50. package/es/packages/components/fm-layout/src/main/columns.vue2.mjs +100 -0
  51. package/es/packages/components/fm-layout/src/main/defaults.vue.mjs +5 -0
  52. package/es/packages/components/fm-layout/src/main/defaults.vue2.mjs +153 -0
  53. package/es/packages/components/fm-layout/src/main/transverse.vue.mjs +5 -0
  54. package/es/packages/components/fm-layout/src/main/transverse.vue2.mjs +70 -0
  55. package/es/packages/components/fm-layout/src/navBars/index.vue.mjs +5 -0
  56. package/es/packages/components/fm-layout/src/navBars/index.vue2.mjs +44 -0
  57. package/es/packages/components/fm-layout/src/navBars/tagsView/contextmenu.vue.mjs +5 -0
  58. package/es/packages/components/fm-layout/src/navBars/tagsView/contextmenu.vue2.mjs +156 -0
  59. package/es/packages/components/fm-layout/src/navBars/tagsView/tagsView.vue.mjs +5 -0
  60. package/es/packages/components/fm-layout/src/navBars/tagsView/tagsView.vue2.mjs +576 -0
  61. package/es/packages/components/fm-layout/src/navBars/topBar/breadcrumb.vue.mjs +5 -0
  62. package/es/packages/components/fm-layout/src/navBars/topBar/breadcrumb.vue2.mjs +169 -0
  63. package/es/packages/components/fm-layout/src/navBars/topBar/index.vue.mjs +5 -0
  64. package/es/packages/components/fm-layout/src/navBars/topBar/index.vue2.mjs +113 -0
  65. package/es/packages/components/fm-layout/src/navBars/topBar/search.vue.mjs +5 -0
  66. package/es/packages/components/fm-layout/src/navBars/topBar/search.vue2.mjs +120 -0
  67. package/es/packages/components/fm-layout/src/navBars/topBar/upgradeInfo.vue.mjs +5 -0
  68. package/es/packages/components/fm-layout/src/navBars/topBar/upgradeInfo.vue2.mjs +72 -0
  69. package/es/packages/components/fm-layout/src/navBars/topBar/user.vue.mjs +5 -0
  70. package/es/packages/components/fm-layout/src/navBars/topBar/user.vue2.mjs +699 -0
  71. package/es/packages/components/fm-layout/src/navBars/topBar/userNews.vue.mjs +5 -0
  72. package/es/packages/components/fm-layout/src/navBars/topBar/userNews.vue2.mjs +255 -0
  73. package/es/packages/components/fm-layout/src/navMenu/horizontal.vue.mjs +5 -0
  74. package/es/packages/components/fm-layout/src/navMenu/horizontal.vue2.mjs +182 -0
  75. package/es/packages/components/fm-layout/src/navMenu/subItem.vue.mjs +5 -0
  76. package/es/packages/components/fm-layout/src/navMenu/subItem.vue2.mjs +113 -0
  77. package/es/packages/components/fm-layout/src/navMenu/vertical.vue.mjs +5 -0
  78. package/es/packages/components/fm-layout/src/navMenu/vertical.vue2.mjs +159 -0
  79. package/es/packages/components/fm-layout/src/routerView/iframes.vue.mjs +5 -0
  80. package/es/packages/components/fm-layout/src/routerView/iframes.vue2.mjs +128 -0
  81. package/es/packages/components/fm-layout/src/routerView/parent.vue.mjs +5 -0
  82. package/es/packages/components/fm-layout/src/routerView/parent.vue2.mjs +141 -0
  83. package/es/packages/components/fm-layout/src/type.mjs +1 -0
  84. package/es/packages/components/index.mjs +1 -0
  85. package/index.js +4071 -73
  86. package/index.min.js +5 -5
  87. package/index.min.mjs +5 -5
  88. package/index.mjs +4082 -81
  89. package/lib/component.js +3 -1
  90. package/lib/components/fm-layout/index.d.ts +32 -0
  91. package/lib/components/fm-layout/src/component/aside.vue.d.ts +5 -0
  92. package/lib/components/fm-layout/src/component/columnsAside.vue.d.ts +5 -0
  93. package/lib/components/fm-layout/src/component/header.vue.d.ts +16 -0
  94. package/lib/components/fm-layout/src/component/main.vue.d.ts +7 -0
  95. package/lib/components/fm-layout/src/footer/index.vue.d.ts +3 -0
  96. package/lib/components/fm-layout/src/index.vue.d.ts +22 -0
  97. package/lib/components/fm-layout/src/logo/index.vue.d.ts +3 -0
  98. package/lib/components/fm-layout/src/main/classic.vue.d.ts +18 -0
  99. package/lib/components/fm-layout/src/main/columns.vue.d.ts +19 -0
  100. package/lib/components/fm-layout/src/main/defaults.vue.d.ts +48 -0
  101. package/lib/components/fm-layout/src/main/transverse.vue.d.ts +18 -0
  102. package/lib/components/fm-layout/src/navBars/index.vue.d.ts +16 -0
  103. package/lib/components/fm-layout/src/navBars/tagsView/contextmenu.vue.d.ts +28 -0
  104. package/lib/components/fm-layout/src/navBars/tagsView/tagsView.vue.d.ts +45 -0
  105. package/lib/components/fm-layout/src/navBars/topBar/breadcrumb.vue.d.ts +3 -0
  106. package/lib/components/fm-layout/src/navBars/topBar/index.vue.d.ts +16 -0
  107. package/lib/components/fm-layout/src/navBars/topBar/search.vue.d.ts +7 -0
  108. package/lib/components/fm-layout/src/navBars/topBar/upgradeInfo.vue.d.ts +5 -0
  109. package/lib/components/fm-layout/src/navBars/topBar/user.vue.d.ts +75 -0
  110. package/lib/components/fm-layout/src/navBars/topBar/userNews.vue.d.ts +9 -0
  111. package/lib/components/fm-layout/src/navMenu/horizontal.vue.d.ts +42 -0
  112. package/lib/components/fm-layout/src/navMenu/subItem.vue.d.ts +42 -0
  113. package/lib/components/fm-layout/src/navMenu/vertical.vue.d.ts +42 -0
  114. package/lib/components/fm-layout/src/routerView/iframes.vue.d.ts +35 -0
  115. package/lib/components/fm-layout/src/routerView/parent.vue.d.ts +3 -0
  116. package/lib/components/fm-layout/src/type.d.ts +2 -0
  117. package/lib/components/fm-layout/style/css.d.ts +0 -0
  118. package/lib/components/fm-layout/style/index.d.ts +0 -0
  119. package/lib/components/index.d.ts +1 -0
  120. package/lib/{index.css → defaults.css} +2 -2
  121. package/lib/packages/components/fm-layout/index.js +9 -0
  122. package/lib/packages/components/fm-layout/src/component/aside.vue.js +9 -0
  123. package/lib/packages/components/fm-layout/src/component/aside.vue2.js +179 -0
  124. package/lib/packages/components/fm-layout/src/component/columnsAside.vue.js +9 -0
  125. package/lib/packages/components/fm-layout/src/component/columnsAside.vue2.js +277 -0
  126. package/lib/packages/components/fm-layout/src/component/header.vue.js +9 -0
  127. package/lib/packages/components/fm-layout/src/component/header.vue2.js +54 -0
  128. package/lib/packages/components/fm-layout/src/component/main.vue.js +9 -0
  129. package/lib/packages/components/fm-layout/src/component/main.vue2.js +85 -0
  130. package/lib/packages/components/fm-layout/src/footer/index.vue.js +9 -0
  131. package/lib/packages/components/fm-layout/src/footer/index.vue2.js +33 -0
  132. package/lib/packages/components/fm-layout/src/index.vue.js +9 -0
  133. package/lib/packages/components/fm-layout/src/index.vue2.js +95 -0
  134. package/lib/packages/components/fm-layout/src/logo/index.vue.js +9 -0
  135. package/lib/packages/components/fm-layout/src/logo/index.vue2.js +61 -0
  136. package/lib/packages/components/fm-layout/src/main/classic.vue.js +9 -0
  137. package/lib/packages/components/fm-layout/src/main/classic.vue2.js +91 -0
  138. package/lib/packages/components/fm-layout/src/main/columns.vue.js +9 -0
  139. package/lib/packages/components/fm-layout/src/main/columns.vue2.js +104 -0
  140. package/lib/packages/components/fm-layout/src/main/defaults.vue.js +9 -0
  141. package/lib/packages/components/fm-layout/src/main/defaults.vue2.js +157 -0
  142. package/lib/packages/components/fm-layout/src/main/transverse.vue.js +9 -0
  143. package/lib/packages/components/fm-layout/src/main/transverse.vue2.js +74 -0
  144. package/lib/packages/components/fm-layout/src/navBars/index.vue.js +9 -0
  145. package/lib/packages/components/fm-layout/src/navBars/index.vue2.js +48 -0
  146. package/lib/packages/components/fm-layout/src/navBars/tagsView/contextmenu.vue.js +9 -0
  147. package/lib/packages/components/fm-layout/src/navBars/tagsView/contextmenu.vue2.js +160 -0
  148. package/lib/packages/components/fm-layout/src/navBars/tagsView/tagsView.vue.js +9 -0
  149. package/lib/packages/components/fm-layout/src/navBars/tagsView/tagsView.vue2.js +580 -0
  150. package/lib/packages/components/fm-layout/src/navBars/topBar/breadcrumb.vue.js +9 -0
  151. package/lib/packages/components/fm-layout/src/navBars/topBar/breadcrumb.vue2.js +173 -0
  152. package/lib/packages/components/fm-layout/src/navBars/topBar/index.vue.js +9 -0
  153. package/lib/packages/components/fm-layout/src/navBars/topBar/index.vue2.js +117 -0
  154. package/lib/packages/components/fm-layout/src/navBars/topBar/search.vue.js +9 -0
  155. package/lib/packages/components/fm-layout/src/navBars/topBar/search.vue2.js +124 -0
  156. package/lib/packages/components/fm-layout/src/navBars/topBar/upgradeInfo.vue.js +9 -0
  157. package/lib/packages/components/fm-layout/src/navBars/topBar/upgradeInfo.vue2.js +76 -0
  158. package/lib/packages/components/fm-layout/src/navBars/topBar/user.vue.js +9 -0
  159. package/lib/packages/components/fm-layout/src/navBars/topBar/user.vue2.js +703 -0
  160. package/lib/packages/components/fm-layout/src/navBars/topBar/userNews.vue.js +9 -0
  161. package/lib/packages/components/fm-layout/src/navBars/topBar/userNews.vue2.js +259 -0
  162. package/lib/packages/components/fm-layout/src/navMenu/horizontal.vue.js +9 -0
  163. package/lib/packages/components/fm-layout/src/navMenu/horizontal.vue2.js +186 -0
  164. package/lib/packages/components/fm-layout/src/navMenu/subItem.vue.js +9 -0
  165. package/lib/packages/components/fm-layout/src/navMenu/subItem.vue2.js +117 -0
  166. package/lib/packages/components/fm-layout/src/navMenu/vertical.vue.js +9 -0
  167. package/lib/packages/components/fm-layout/src/navMenu/vertical.vue2.js +163 -0
  168. package/lib/packages/components/fm-layout/src/routerView/iframes.vue.js +9 -0
  169. package/lib/packages/components/fm-layout/src/routerView/iframes.vue2.js +132 -0
  170. package/lib/packages/components/fm-layout/src/routerView/parent.vue.js +9 -0
  171. package/lib/packages/components/fm-layout/src/routerView/parent.vue2.js +145 -0
  172. package/lib/packages/components/fm-layout/src/type.js +2 -0
  173. package/lib/packages/components/index.js +14 -12
  174. package/locale/en.js +1 -1
  175. package/locale/en.min.js +1 -1
  176. package/locale/en.min.mjs +1 -1
  177. package/locale/en.mjs +1 -1
  178. package/locale/zh-cn.js +1 -1
  179. package/locale/zh-cn.min.js +1 -1
  180. package/locale/zh-cn.min.mjs +1 -1
  181. package/locale/zh-cn.mjs +1 -1
  182. package/package.json +1 -1
  183. package/theme-chalk/f-layout.css +1 -0
  184. package/theme-chalk/index.css +1 -1
  185. package/theme-chalk/src/index.scss +1 -0
  186. package/theme-chalk/src/layout.scss +655 -0
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './aside.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,175 @@
1
+ import { defineComponent, defineAsyncComponent, ref, reactive, computed, onBeforeMount, watch, resolveComponent, withDirectives, openBlock, createElementBlock, createVNode, normalizeClass, withCtx, createBlock, unref, createCommentVNode, vShow } from 'vue';
2
+ import { storeToRefs } from 'pinia';
3
+ import '../../../../stores/index.mjs';
4
+ import emitter from '../../../../utils/mitt.mjs';
5
+ import { useRoutesList } from '../../../../stores/routesList.mjs';
6
+ import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
7
+ import { useTagsViewRoutes } from '../../../../stores/tagsViewRoutes.mjs';
8
+
9
+ const _hoisted_1 = { class: "h100" };
10
+ var _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "aside",
12
+ setup(__props) {
13
+ const Logo = defineAsyncComponent(() => import('../logo/index.vue.mjs'));
14
+ const Vertical = defineAsyncComponent(() => import('../navMenu/vertical.vue.mjs'));
15
+ const layoutAsideScrollbarRef = ref();
16
+ const stores = useRoutesList();
17
+ const storesThemeConfig = useThemeConfig();
18
+ const storesTagsViewRoutes = useTagsViewRoutes();
19
+ const { routesList } = storeToRefs(stores);
20
+ const { themeConfig } = storeToRefs(storesThemeConfig);
21
+ const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
22
+ const state = reactive({
23
+ menuList: [],
24
+ clientWidth: 0
25
+ });
26
+ const setCollapseStyle = computed(() => {
27
+ const { layout, isCollapse, menuBar } = themeConfig.value;
28
+ const asideBrTheme = ["#FFFFFF", "#FFF", "#fff", "#ffffff"];
29
+ const asideBrColor = asideBrTheme.includes(menuBar) ? "layout-el-aside-br-color" : "";
30
+ if (state.clientWidth <= 1e3) {
31
+ if (isCollapse) {
32
+ document.body.setAttribute("class", "el-popup-parent--hidden");
33
+ const asideEle = document.querySelector(".layout-container");
34
+ const modeDivs = document.createElement("div");
35
+ modeDivs.setAttribute("class", "layout-aside-mobile-mode");
36
+ asideEle.appendChild(modeDivs);
37
+ modeDivs.addEventListener("click", closeLayoutAsideMobileMode);
38
+ return [asideBrColor, "layout-aside-mobile", "layout-aside-mobile-open"];
39
+ } else {
40
+ closeLayoutAsideMobileMode();
41
+ return [asideBrColor, "layout-aside-mobile", "layout-aside-mobile-close"];
42
+ }
43
+ } else {
44
+ if (layout === "columns" || layout === "classic") {
45
+ if (isCollapse) return [asideBrColor, "layout-aside-pc-1"];
46
+ else return [asideBrColor, "layout-aside-pc-240"];
47
+ } else {
48
+ if (isCollapse) return [asideBrColor, "layout-aside-pc-64"];
49
+ else return [asideBrColor, "layout-aside-pc-240"];
50
+ }
51
+ }
52
+ });
53
+ const setShowLogo = computed(() => {
54
+ let { layout, isShowLogo } = themeConfig.value;
55
+ return isShowLogo && layout === "defaults" || isShowLogo && layout === "columns";
56
+ });
57
+ const closeLayoutAsideMobileMode = () => {
58
+ const el = document.querySelector(".layout-aside-mobile-mode");
59
+ el == null ? void 0 : el.setAttribute("style", "animation: error-img-two 0.3s");
60
+ setTimeout(() => {
61
+ var _a;
62
+ (_a = el == null ? void 0 : el.parentNode) == null ? void 0 : _a.removeChild(el);
63
+ }, 300);
64
+ const clientWidth = document.body.clientWidth;
65
+ if (clientWidth < 1e3) themeConfig.value.isCollapse = false;
66
+ document.body.setAttribute("class", "");
67
+ };
68
+ const setFilterRoutes = () => {
69
+ if (themeConfig.value.layout === "columns") return false;
70
+ state.menuList = filterRoutesFun(routesList.value);
71
+ };
72
+ const filterRoutesFun = (arr) => {
73
+ return arr.filter((item) => {
74
+ var _a;
75
+ return !((_a = item.meta) == null ? void 0 : _a.isHide);
76
+ }).map((item) => {
77
+ item = Object.assign({}, item);
78
+ if (item.children) item.children = filterRoutesFun(item.children);
79
+ return item;
80
+ });
81
+ };
82
+ const initMenuFixed = (clientWidth) => {
83
+ state.clientWidth = clientWidth;
84
+ };
85
+ const onAsideEnterLeave = (bool) => {
86
+ let { layout } = themeConfig.value;
87
+ if (layout !== "columns") return false;
88
+ if (!bool) emitter.emit("restoreDefault");
89
+ if (themeConfig.value.isColumnsMenuHoverPreload) stores.setColumnsMenuHover(bool);
90
+ };
91
+ onBeforeMount(() => {
92
+ initMenuFixed(document.body.clientWidth);
93
+ setFilterRoutes();
94
+ emitter.on("setSendColumnsChildren", (res) => {
95
+ state.menuList = res.children;
96
+ });
97
+ emitter.on("setSendClassicChildren", (res) => {
98
+ let { layout, isClassicSplitMenu } = themeConfig.value;
99
+ if (layout === "classic" && isClassicSplitMenu) {
100
+ res.children.length <= 1 ? themeConfig.value.isCollapse = true : themeConfig.value.isCollapse = false;
101
+ state.menuList = [];
102
+ state.menuList = res.children;
103
+ }
104
+ });
105
+ emitter.on("getBreadcrumbIndexSetFilterRoutes", () => {
106
+ setFilterRoutes();
107
+ });
108
+ emitter.on("layoutMobileResize", (res) => {
109
+ initMenuFixed(res.clientWidth);
110
+ closeLayoutAsideMobileMode();
111
+ });
112
+ });
113
+ watch(
114
+ () => [themeConfig.value.isShowLogoChange, themeConfig.value.isShowLogo, themeConfig.value.layout, themeConfig.value.isClassicSplitMenu],
115
+ ([isShowLogoChange, isShowLogo, layout, isClassicSplitMenu]) => {
116
+ if (isShowLogoChange !== isShowLogo) {
117
+ if (layoutAsideScrollbarRef.value) layoutAsideScrollbarRef.value.update();
118
+ }
119
+ if (layout === "classic" && isClassicSplitMenu) return false;
120
+ }
121
+ );
122
+ watch(
123
+ () => routesList.value,
124
+ () => {
125
+ setFilterRoutes();
126
+ }
127
+ );
128
+ return (_ctx, _cache) => {
129
+ const _component_el_scrollbar = resolveComponent("el-scrollbar");
130
+ const _component_el_aside = resolveComponent("el-aside");
131
+ return withDirectives((openBlock(), createElementBlock(
132
+ "div",
133
+ _hoisted_1,
134
+ [
135
+ createVNode(_component_el_aside, {
136
+ class: normalizeClass(["layout-aside", setCollapseStyle.value])
137
+ }, {
138
+ default: withCtx(() => [
139
+ setShowLogo.value ? (openBlock(), createBlock(unref(Logo), { key: 0 })) : createCommentVNode("v-if", true),
140
+ createVNode(
141
+ _component_el_scrollbar,
142
+ {
143
+ class: "flex-auto",
144
+ ref_key: "layoutAsideScrollbarRef",
145
+ ref: layoutAsideScrollbarRef,
146
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => onAsideEnterLeave(true)),
147
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => onAsideEnterLeave(false))
148
+ },
149
+ {
150
+ default: withCtx(() => [
151
+ createVNode(unref(Vertical), {
152
+ menuList: state.menuList
153
+ }, null, 8, ["menuList"])
154
+ ]),
155
+ _: 1
156
+ /* STABLE */
157
+ },
158
+ 512
159
+ /* NEED_PATCH */
160
+ )
161
+ ]),
162
+ _: 1
163
+ /* STABLE */
164
+ }, 8, ["class"])
165
+ ],
166
+ 512
167
+ /* NEED_PATCH */
168
+ )), [
169
+ [vShow, !unref(isTagsViewCurrenFull)]
170
+ ]);
171
+ };
172
+ }
173
+ });
174
+
175
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './columnsAside.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,273 @@
1
+ import { defineComponent, ref, reactive, onMounted, onUnmounted, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, unref, createVNode, withCtx, Fragment, renderList, normalizeClass, toDisplayString, nextTick } from 'vue';
2
+ import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
3
+ import { storeToRefs } from 'pinia';
4
+ import '../../../../stores/index.mjs';
5
+ import emitter from '../../../../utils/mitt.mjs';
6
+ import { useRoutesList } from '../../../../stores/routesList.mjs';
7
+ import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
8
+
9
+ const _hoisted_1 = { class: "layout-columns-aside" };
10
+ const _hoisted_2 = { class: "layout-logo" };
11
+ const _hoisted_3 = ["src"];
12
+ const _hoisted_4 = ["onClick", "onMouseenter", "title"];
13
+ const _hoisted_5 = { class: "columns-vertical-title font12" };
14
+ const _hoisted_6 = ["href"];
15
+ const _hoisted_7 = { class: "columns-vertical-title font12" };
16
+ var _sfc_main = /* @__PURE__ */ defineComponent({
17
+ __name: "columnsAside",
18
+ setup(__props) {
19
+ const columnsAsideOffsetTopRefs = ref([]);
20
+ const columnsAsideActiveRef = ref();
21
+ const stores = useRoutesList();
22
+ const storesThemeConfig = useThemeConfig();
23
+ const { routesList, isColumnsMenuHover, isColumnsNavHover } = storeToRefs(stores);
24
+ const { themeConfig } = storeToRefs(storesThemeConfig);
25
+ const route = useRoute();
26
+ const router = useRouter();
27
+ const state = reactive({
28
+ columnsAsideList: [],
29
+ liIndex: 0,
30
+ liOldIndex: null,
31
+ liHoverIndex: null,
32
+ liOldPath: null,
33
+ difference: 0,
34
+ routeSplit: []
35
+ });
36
+ const setColumnsAsideMove = (k) => {
37
+ if (k === void 0) return false;
38
+ state.liIndex = k;
39
+ columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`;
40
+ };
41
+ const onColumnsAsideMenuClick = async (v) => {
42
+ var _a, _b, _c;
43
+ let { path, redirect } = v;
44
+ if (redirect) {
45
+ onColumnsAsideDown(v.k);
46
+ if (route.path.startsWith(redirect)) emitter.emit("setSendColumnsChildren", setSendChildren(redirect));
47
+ else router.push(redirect);
48
+ } else {
49
+ if (!v.children || ((_a = v.children) == null ? void 0 : _a.length) === 0) {
50
+ router.push(path);
51
+ onColumnsAsideDown(v.k);
52
+ } else {
53
+ const resData = setSendChildren(path);
54
+ if (Object.keys(resData).length <= 0) return false;
55
+ onColumnsAsideDown((_b = resData.item) == null ? void 0 : _b.k);
56
+ emitter.emit("setSendColumnsChildren", resData);
57
+ }
58
+ }
59
+ if (!v.children || ((_c = v.children) == null ? void 0 : _c.length) === 0) themeConfig.value.isCollapse = true;
60
+ else if (v.children.length > 1) themeConfig.value.isCollapse = false;
61
+ };
62
+ const onColumnsAsideMenuMouseenter = (v, k) => {
63
+ if (!themeConfig.value.isColumnsMenuHoverPreload) return false;
64
+ let { path } = v;
65
+ state.liOldPath = path;
66
+ state.liOldIndex = k;
67
+ state.liHoverIndex = k;
68
+ emitter.emit("setSendColumnsChildren", setSendChildren(path));
69
+ stores.setColumnsMenuHover(false);
70
+ stores.setColumnsNavHover(true);
71
+ };
72
+ const onColumnsAsideMenuMouseleave = async () => {
73
+ if (!themeConfig.value.isColumnsMenuHoverPreload) return false;
74
+ await stores.setColumnsNavHover(false);
75
+ setTimeout(() => {
76
+ if (!isColumnsMenuHover && !isColumnsNavHover) emitter.emit("restoreDefault");
77
+ }, 100);
78
+ };
79
+ const onColumnsAsideDown = (k) => {
80
+ nextTick(() => {
81
+ setColumnsAsideMove(k);
82
+ });
83
+ };
84
+ const setMenuAutoCollaps = (path) => {
85
+ var _a, _b;
86
+ const resData = setSendChildren(path);
87
+ !((_a = resData.item) == null ? void 0 : _a.redirect) && resData.children.length == 0 || ((_b = resData.item) == null ? void 0 : _b.redirect) && resData.children.length <= 1 ? themeConfig.value.isCollapse = true : themeConfig.value.isCollapse = false;
88
+ return resData;
89
+ };
90
+ const setFilterRoutes = () => {
91
+ var _a;
92
+ state.columnsAsideList = filterRoutesFun(routesList.value);
93
+ const resData = setMenuAutoCollaps(route.path);
94
+ onColumnsAsideDown((_a = resData.item) == null ? void 0 : _a.k);
95
+ setTimeout(() => {
96
+ emitter.emit("setSendColumnsChildren", resData);
97
+ }, 500);
98
+ };
99
+ const setSendChildren = (path) => {
100
+ const currentPathSplit = path.split("/");
101
+ let currentData = { children: [] };
102
+ state.columnsAsideList.map((v, k) => {
103
+ if (v.path === `/${currentPathSplit[1]}`) {
104
+ v["k"] = k;
105
+ currentData["item"] = { ...v };
106
+ currentData["children"] = [{ ...v }];
107
+ if (v.children) currentData["children"] = v.children;
108
+ }
109
+ });
110
+ return currentData;
111
+ };
112
+ const filterRoutesFun = (arr) => {
113
+ return arr.filter((item) => {
114
+ var _a;
115
+ return !((_a = item.meta) == null ? void 0 : _a.isHide);
116
+ }).map((item) => {
117
+ item = Object.assign({}, item);
118
+ if (item.children) item.children = filterRoutesFun(item.children);
119
+ return item;
120
+ });
121
+ };
122
+ const setColumnsMenuHighlight = (path) => {
123
+ state.routeSplit = path.split("/");
124
+ state.routeSplit.shift();
125
+ const routeFirst = `/${state.routeSplit[0]}`;
126
+ const currentSplitRoute = state.columnsAsideList.find((v) => v.path === routeFirst);
127
+ if (!currentSplitRoute) return false;
128
+ setTimeout(() => {
129
+ onColumnsAsideDown(currentSplitRoute.k);
130
+ }, 0);
131
+ };
132
+ onMounted(() => {
133
+ setFilterRoutes();
134
+ emitter.on("restoreDefault", () => {
135
+ state.liOldIndex = null;
136
+ state.liOldPath = null;
137
+ });
138
+ });
139
+ onUnmounted(() => {
140
+ emitter.off("restoreDefault", () => {
141
+ });
142
+ });
143
+ onBeforeRouteUpdate((to) => {
144
+ const resData = setMenuAutoCollaps(to.path);
145
+ setColumnsMenuHighlight(to.path);
146
+ emitter.emit("setSendColumnsChildren", resData);
147
+ });
148
+ watch(
149
+ [() => themeConfig.value.columnsAsideStyle, isColumnsMenuHover, isColumnsNavHover],
150
+ () => {
151
+ themeConfig.value.columnsAsideStyle === "columnsRound" ? state.difference = 3 : state.difference = 0;
152
+ if (!isColumnsMenuHover.value && !isColumnsNavHover.value) {
153
+ state.liHoverIndex = null;
154
+ emitter.emit("setSendColumnsChildren", setSendChildren(route.path));
155
+ } else {
156
+ state.liHoverIndex = state.liOldIndex;
157
+ if (!state.liOldPath) return false;
158
+ emitter.emit("setSendColumnsChildren", setSendChildren(state.liOldPath));
159
+ }
160
+ },
161
+ {
162
+ deep: true
163
+ }
164
+ );
165
+ return (_ctx, _cache) => {
166
+ const _component_SvgIcon = resolveComponent("SvgIcon");
167
+ const _component_el_scrollbar = resolveComponent("el-scrollbar");
168
+ return openBlock(), createElementBlock("div", _hoisted_1, [
169
+ createElementVNode("div", _hoisted_2, [
170
+ createElementVNode("img", {
171
+ src: unref(themeConfig).logoUrl,
172
+ class: "layout-logo-medium-img"
173
+ }, null, 8, _hoisted_3)
174
+ ]),
175
+ createVNode(_component_el_scrollbar, null, {
176
+ default: withCtx(() => [
177
+ createElementVNode(
178
+ "ul",
179
+ {
180
+ onMouseleave: _cache[0] || (_cache[0] = ($event) => onColumnsAsideMenuMouseleave())
181
+ },
182
+ [
183
+ (openBlock(true), createElementBlock(
184
+ Fragment,
185
+ null,
186
+ renderList(state.columnsAsideList, (v, k) => {
187
+ return openBlock(), createElementBlock("li", {
188
+ key: k,
189
+ onClick: ($event) => onColumnsAsideMenuClick(v),
190
+ onMouseenter: ($event) => onColumnsAsideMenuMouseenter(v, k),
191
+ ref_for: true,
192
+ ref: (el) => {
193
+ if (el) columnsAsideOffsetTopRefs.value[k] = el;
194
+ },
195
+ class: normalizeClass({ "layout-columns-active": state.liIndex === k, "layout-columns-hover": state.liHoverIndex === k }),
196
+ title: _ctx.$t(`message.menu.${v.meta.title}`)
197
+ }, [
198
+ !v.meta.isLink || v.meta.isLink && v.meta.isIframe ? (openBlock(), createElementBlock(
199
+ "div",
200
+ {
201
+ key: 0,
202
+ class: normalizeClass(unref(themeConfig).columnsAsideLayout)
203
+ },
204
+ [
205
+ createVNode(_component_SvgIcon, {
206
+ name: v.meta.icon
207
+ }, null, 8, ["name"]),
208
+ createElementVNode(
209
+ "div",
210
+ _hoisted_5,
211
+ toDisplayString(_ctx.$t(`message.menu.${v.meta.title}`)),
212
+ 1
213
+ /* TEXT */
214
+ )
215
+ ],
216
+ 2
217
+ /* CLASS */
218
+ )) : (openBlock(), createElementBlock(
219
+ "div",
220
+ {
221
+ key: 1,
222
+ class: normalizeClass(unref(themeConfig).columnsAsideLayout)
223
+ },
224
+ [
225
+ createElementVNode("a", {
226
+ href: v.meta.isLink,
227
+ target: "_blank"
228
+ }, [
229
+ createVNode(_component_SvgIcon, {
230
+ name: v.meta.icon
231
+ }, null, 8, ["name"]),
232
+ createElementVNode(
233
+ "div",
234
+ _hoisted_7,
235
+ toDisplayString(_ctx.$t(`message.menu.${v.meta.title}`)),
236
+ 1
237
+ /* TEXT */
238
+ )
239
+ ], 8, _hoisted_6)
240
+ ],
241
+ 2
242
+ /* CLASS */
243
+ ))
244
+ ], 42, _hoisted_4);
245
+ }),
246
+ 128
247
+ /* KEYED_FRAGMENT */
248
+ )),
249
+ createElementVNode(
250
+ "div",
251
+ {
252
+ ref_key: "columnsAsideActiveRef",
253
+ ref: columnsAsideActiveRef,
254
+ class: normalizeClass(unref(themeConfig).columnsAsideStyle)
255
+ },
256
+ null,
257
+ 2
258
+ /* CLASS */
259
+ )
260
+ ],
261
+ 32
262
+ /* NEED_HYDRATION */
263
+ )
264
+ ]),
265
+ _: 1
266
+ /* STABLE */
267
+ })
268
+ ]);
269
+ };
270
+ }
271
+ });
272
+
273
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './header.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,50 @@
1
+ import { defineComponent, defineAsyncComponent, resolveComponent, withDirectives, openBlock, createBlock, withCtx, unref, createElementBlock, Fragment, renderList, renderSlot, mergeProps, vShow } from 'vue';
2
+ import { storeToRefs } from 'pinia';
3
+ import '../../../../stores/index.mjs';
4
+ import { useTagsViewRoutes } from '../../../../stores/tagsViewRoutes.mjs';
5
+
6
+ var _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "header",
8
+ setup(__props) {
9
+ const NavBarsIndex = defineAsyncComponent(() => import('../navBars/index.vue.mjs'));
10
+ const storesTagsViewRoutes = useTagsViewRoutes();
11
+ const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
12
+ return (_ctx, _cache) => {
13
+ const _component_el_header = resolveComponent("el-header");
14
+ return withDirectives((openBlock(), createBlock(
15
+ _component_el_header,
16
+ { class: "layout-header" },
17
+ {
18
+ default: withCtx(() => [
19
+ !_ctx.$slots.navBars ? (openBlock(), createBlock(unref(NavBarsIndex), { key: 0 }, {
20
+ default: withCtx(() => [
21
+ (openBlock(true), createElementBlock(
22
+ Fragment,
23
+ null,
24
+ renderList(_ctx.$slots, (_, name) => {
25
+ return renderSlot(_ctx.$slots, name, mergeProps({
26
+ key: name,
27
+ ref_for: true
28
+ }, _ctx.$slots[name].props || {}));
29
+ }),
30
+ 128
31
+ /* KEYED_FRAGMENT */
32
+ ))
33
+ ]),
34
+ _: 3
35
+ /* FORWARDED */
36
+ })) : renderSlot(_ctx.$slots, "navBars", { key: 1 })
37
+ ]),
38
+ _: 3
39
+ /* FORWARDED */
40
+ },
41
+ 512
42
+ /* NEED_PATCH */
43
+ )), [
44
+ [vShow, !unref(isTagsViewCurrenFull)]
45
+ ]);
46
+ };
47
+ }
48
+ });
49
+
50
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './main.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,81 @@
1
+ import { defineComponent, defineAsyncComponent, ref, computed, onMounted, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createVNode, unref, createCommentVNode } from 'vue';
2
+ import { useRoute } from 'vue-router';
3
+ import { storeToRefs } from 'pinia';
4
+ import '../../../../stores/index.mjs';
5
+ import '../../../../utils/index.mjs';
6
+ import { useTagsViewRoutes } from '../../../../stores/tagsViewRoutes.mjs';
7
+ import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
8
+ import { NextLoading } from '../../../../utils/loading.mjs';
9
+
10
+ var _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "main",
12
+ setup(__props, { expose: __expose }) {
13
+ const LayoutParentView = defineAsyncComponent(() => import('../routerView/parent.vue.mjs'));
14
+ const LayoutFooter = defineAsyncComponent(() => import('../footer/index.vue.mjs'));
15
+ const layoutMainScrollbarRef = ref();
16
+ const route = useRoute();
17
+ const storesTagsViewRoutes = useTagsViewRoutes();
18
+ const storesThemeConfig = useThemeConfig();
19
+ const { themeConfig } = storeToRefs(storesThemeConfig);
20
+ const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
21
+ const isFooter = computed(() => {
22
+ return themeConfig.value.isFooter && !route.meta.isIframe;
23
+ });
24
+ const isFixedHeader = computed(() => {
25
+ return themeConfig.value.isFixedHeader;
26
+ });
27
+ const setBacktopClass = computed(() => {
28
+ if (themeConfig.value.isFixedHeader) return `.layout-backtop-header-fixed .el-scrollbar__wrap`;
29
+ else return `.layout-backtop .el-scrollbar__wrap`;
30
+ });
31
+ const setMainHeight = computed(() => {
32
+ if (isTagsViewCurrenFull.value) return "0px";
33
+ const { isTagsview, layout } = themeConfig.value;
34
+ if (isTagsview && layout !== "classic") return "85px";
35
+ else return "51px";
36
+ });
37
+ onMounted(() => {
38
+ NextLoading.done(600);
39
+ });
40
+ __expose({
41
+ layoutMainScrollbarRef
42
+ });
43
+ return (_ctx, _cache) => {
44
+ const _component_el_scrollbar = resolveComponent("el-scrollbar");
45
+ const _component_el_backtop = resolveComponent("el-backtop");
46
+ const _component_el_main = resolveComponent("el-main");
47
+ return openBlock(), createBlock(_component_el_main, {
48
+ class: "layout-main",
49
+ style: normalizeStyle(isFixedHeader.value ? `height: calc(100% - ${setMainHeight.value})` : `minHeight: calc(100% - ${setMainHeight.value})`)
50
+ }, {
51
+ default: withCtx(() => [
52
+ createVNode(
53
+ _component_el_scrollbar,
54
+ {
55
+ ref_key: "layoutMainScrollbarRef",
56
+ ref: layoutMainScrollbarRef,
57
+ class: "layout-main-scroll layout-backtop-header-fixed",
58
+ "wrap-class": "layout-main-scroll",
59
+ "view-class": "layout-main-scroll"
60
+ },
61
+ {
62
+ default: withCtx(() => [
63
+ createVNode(unref(LayoutParentView)),
64
+ isFooter.value ? (openBlock(), createBlock(unref(LayoutFooter), { key: 0 })) : createCommentVNode("v-if", true)
65
+ ]),
66
+ _: 1
67
+ /* STABLE */
68
+ },
69
+ 512
70
+ /* NEED_PATCH */
71
+ ),
72
+ createVNode(_component_el_backtop, { target: setBacktopClass.value }, null, 8, ["target"])
73
+ ]),
74
+ _: 1
75
+ /* STABLE */
76
+ }, 8, ["style"]);
77
+ };
78
+ }
79
+ });
80
+
81
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,29 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, unref } from 'vue';
2
+ import { storeToRefs } from 'pinia';
3
+ import '../../../../stores/index.mjs';
4
+ import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
5
+
6
+ const _hoisted_1 = { class: "layout-footer mb5" };
7
+ const _hoisted_2 = { class: "layout-footer-warp" };
8
+ var _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "index",
10
+ setup(__props) {
11
+ const storesThemeConfig = useThemeConfig();
12
+ const { themeConfig } = storeToRefs(storesThemeConfig);
13
+ return (_ctx, _cache) => {
14
+ return openBlock(), createElementBlock("div", _hoisted_1, [
15
+ createElementVNode("div", _hoisted_2, [
16
+ createElementVNode(
17
+ "div",
18
+ null,
19
+ toDisplayString(unref(themeConfig).globalTitle) + " " + toDisplayString(unref(themeConfig).copyright),
20
+ 1
21
+ /* TEXT */
22
+ )
23
+ ])
24
+ ]);
25
+ };
26
+ }
27
+ });
28
+
29
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };