mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	fix(projects): fix horizontal menu
This commit is contained in:
		@@ -35,9 +35,7 @@ const isHorizontal = computed(() => props.mode === 'horizontal');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const siderCollapse = computed(() => themeStore.layout.mode === 'vertical' && appStore.siderCollapse);
 | 
					const siderCollapse = computed(() => themeStore.layout.mode === 'vertical' && appStore.siderCollapse);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const menuHeightStyle = computed(() =>
 | 
					const headerHeight = computed(() => `${themeStore.header.height}px`);
 | 
				
			||||||
  isHorizontal.value ? { '--n-item-height': `${themeStore.header.height}px` } : {}
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const selectedKey = computed(() => {
 | 
					const selectedKey = computed(() => {
 | 
				
			||||||
  const { hideInMenu, activeMenu } = route.meta;
 | 
					  const { hideInMenu, activeMenu } = route.meta;
 | 
				
			||||||
@@ -83,11 +81,14 @@ watch(
 | 
				
			|||||||
      :options="naiveMenus"
 | 
					      :options="naiveMenus"
 | 
				
			||||||
      :inverted="darkTheme"
 | 
					      :inverted="darkTheme"
 | 
				
			||||||
      :indent="18"
 | 
					      :indent="18"
 | 
				
			||||||
      class="transition-300"
 | 
					      responsive
 | 
				
			||||||
      :style="menuHeightStyle"
 | 
					 | 
				
			||||||
      @update:value="handleClickMenu"
 | 
					      @update:value="handleClickMenu"
 | 
				
			||||||
    />
 | 
					    />
 | 
				
			||||||
  </SimpleScrollbar>
 | 
					  </SimpleScrollbar>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped></style>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					:deep(.n-menu--horizontal) {
 | 
				
			||||||
 | 
					  --n-item-height: v-bind(headerHeight) !important;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user