File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import { computed } from ' vue' ;
3
3
import type { Component } from ' vue' ;
4
+ import { useAppStore } from ' @/store/modules/app' ;
4
5
import { useThemeStore } from ' @/store/modules/theme' ;
5
6
import VerticalMenu from ' ./modules/vertical-menu.vue' ;
6
7
import VerticalMixMenu from ' ./modules/vertical-mix-menu.vue' ;
@@ -12,6 +13,7 @@ defineOptions({
12
13
name: ' GlobalMenu'
13
14
});
14
15
16
+ const appStore = useAppStore ();
15
17
const themeStore = useThemeStore ();
16
18
17
19
const activeMenu = computed (() => {
@@ -24,10 +26,12 @@ const activeMenu = computed(() => {
24
26
25
27
return menuMap [themeStore .layout .mode ];
26
28
});
29
+
30
+ const reRenderVertical = computed (() => themeStore .layout .mode === ' vertical' && appStore .isMobile );
27
31
</script >
28
32
29
33
<template >
30
- <component :is =" activeMenu" />
34
+ <component :is =" activeMenu" :key = " reRenderVertical " />
31
35
</template >
32
36
33
37
<style scoped></style >
You can’t perform that action at this time.
0 commit comments