Browse Source

顶部展示一级菜单栏

master_hella_20240701
yufei0306 8 months ago
parent
commit
504d608595
  1. 12
      src/layout/components/CategoryHeader.vue
  2. 2
      src/store/modules/app.ts

12
src/layout/components/CategoryHeader.vue

@ -97,12 +97,22 @@ $prefix-cls: #{$namespace}-tool-header;
.#{$prefix-cls} {
transition: left var(--transition-time-02);
}
::v-deep(.el-menu--horizontal){
padding-left:20px;
}
::v-deep(.el-menu--horizontal>.el-menu-item){
border-radius: 5px;
height: 40px;
margin-right: 10px;
background: linear-gradient(to top left,var(--left-menu-bg-color),var(--left-menu-text-color));
margin-bottom: 2px;
background: rgb(242, 245, 248);
border: 1px solid #ccc;
// background: linear-gradient(to top left,var(--left-menu-bg-color),var(--left-menu-text-color));
}
::v-deep(.el-menu--horizontal>.el-menu-item.is-active){
background: var(--el-menu-hover-bg-color)
}
</style>

2
src/store/modules/app.ts

@ -101,7 +101,7 @@ export const useAppStore = defineStore('app', {
topToolBorderColor: '#eee'
},
categoryRoutePath:'',
showCategoryMenu:false // true:顶部展示一级菜单栏 false:只有左侧菜单栏
showCategoryMenu:true // true:顶部展示一级菜单栏 false:只有左侧菜单栏
}
},
getters: {

Loading…
Cancel
Save