layout 优化
This commit is contained in:
		
							parent
							
								
									2edf92657e
								
							
						
					
					
						commit
						1ffdcb4b23
					
				| 
						 | 
				
			
			@ -5,7 +5,10 @@
 | 
			
		|||
    :class="{ dark: settingsStore.isDark }"
 | 
			
		||||
  >
 | 
			
		||||
    <n-layout-sider
 | 
			
		||||
      style="box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0"
 | 
			
		||||
      style="
 | 
			
		||||
        box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0;
 | 
			
		||||
        position: relative;
 | 
			
		||||
      "
 | 
			
		||||
      :bordered="true"
 | 
			
		||||
      collapse-mode="width"
 | 
			
		||||
      :collapsed-width="64"
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +86,7 @@
 | 
			
		|||
  const tabStore = useTabsStore();
 | 
			
		||||
  const route = useRoute();
 | 
			
		||||
  const collapsed = ref(false);
 | 
			
		||||
  const platformName = "保安可视化管理系统";
 | 
			
		||||
  const platformName = "智慧食堂系统";
 | 
			
		||||
 | 
			
		||||
  //缓存的组件列表
 | 
			
		||||
  const cachedViews = computed(() =>
 | 
			
		||||
| 
						 | 
				
			
			@ -107,6 +110,15 @@
 | 
			
		|||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
  /* 隐藏滚动条 */
 | 
			
		||||
  :deep(.n-layout-sider-scroll-container) {
 | 
			
		||||
    scrollbar-width: none;
 | 
			
		||||
    -ms-overflow-style: none;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  :deep(.n-layout-sider-scroll-container::-webkit-scrollbar) {
 | 
			
		||||
    display: none;
 | 
			
		||||
  }
 | 
			
		||||
  .h_screen {
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
| 
						 | 
				
			
			@ -116,6 +128,10 @@
 | 
			
		|||
      height: 50px;
 | 
			
		||||
      font-size: 18px;
 | 
			
		||||
      font-weight: bold;
 | 
			
		||||
      position: absolute;
 | 
			
		||||
      top: 0;
 | 
			
		||||
      background: #ffffff;
 | 
			
		||||
      z-index: 1000;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .logo {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,11 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <n-menu
 | 
			
		||||
    :value="route.fullPath"
 | 
			
		||||
    :options="menuOptions"
 | 
			
		||||
  ></n-menu>
 | 
			
		||||
  <div>
 | 
			
		||||
    <div style="height: 50px"></div>
 | 
			
		||||
    <n-menu
 | 
			
		||||
      :value="route.fullPath"
 | 
			
		||||
      :options="menuOptions"
 | 
			
		||||
    ></n-menu>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="tsx">
 | 
			
		||||
  import { Icon } from "@/components";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue