mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: 修复horizontal模式下menu在生产环境显示问题
				
					
				
			This commit is contained in:
		
							parent
							
								
									e50d13a84a
								
							
						
					
					
						commit
						5bce4dfa6a
					
				@ -1,7 +1,7 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
import { ref, watch } from "vue";
 | 
					 | 
				
			||||||
import Search from "../search/index.vue";
 | 
					import Search from "../search/index.vue";
 | 
				
			||||||
import Notice from "../notice/index.vue";
 | 
					import Notice from "../notice/index.vue";
 | 
				
			||||||
 | 
					import { ref, watch, nextTick } from "vue";
 | 
				
			||||||
import SidebarItem from "./sidebarItem.vue";
 | 
					import SidebarItem from "./sidebarItem.vue";
 | 
				
			||||||
import avatars from "/@/assets/avatars.jpg";
 | 
					import avatars from "/@/assets/avatars.jpg";
 | 
				
			||||||
import { useNav } from "/@/layout/hooks/useNav";
 | 
					import { useNav } from "/@/layout/hooks/useNav";
 | 
				
			||||||
@ -26,6 +26,10 @@ const {
 | 
				
			|||||||
  getDropdownItemClass
 | 
					  getDropdownItemClass
 | 
				
			||||||
} = useNav();
 | 
					} = useNav();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nextTick(() => {
 | 
				
			||||||
 | 
					  menuRef.value?.handleResize();
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
watch(
 | 
					watch(
 | 
				
			||||||
  () => route.path,
 | 
					  () => route.path,
 | 
				
			||||||
  () => {
 | 
					  () => {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import Notice from "../notice/index.vue";
 | 
				
			|||||||
import avatars from "/@/assets/avatars.jpg";
 | 
					import avatars from "/@/assets/avatars.jpg";
 | 
				
			||||||
import { useNav } from "/@/layout/hooks/useNav";
 | 
					import { useNav } from "/@/layout/hooks/useNav";
 | 
				
			||||||
import { transformI18n } from "/@/plugins/i18n";
 | 
					import { transformI18n } from "/@/plugins/i18n";
 | 
				
			||||||
import { ref, toRaw, watch, onMounted } from "vue";
 | 
					import { ref, toRaw, watch, onMounted, nextTick } from "vue";
 | 
				
			||||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
					import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
				
			||||||
import { getParentPaths, findRouteByPath } from "/@/router/utils";
 | 
					import { getParentPaths, findRouteByPath } from "/@/router/utils";
 | 
				
			||||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
 | 
					import { useTranslationLang } from "../../hooks/useTranslationLang";
 | 
				
			||||||
@ -43,6 +43,10 @@ onMounted(() => {
 | 
				
			|||||||
  getDefaultActive(route.path);
 | 
					  getDefaultActive(route.path);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nextTick(() => {
 | 
				
			||||||
 | 
					  menuRef.value?.handleResize();
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
watch(
 | 
					watch(
 | 
				
			||||||
  () => route.path,
 | 
					  () => route.path,
 | 
				
			||||||
  () => {
 | 
					  () => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user