Browse Source

修改侧边栏滚动效果

pull/55/head
zq 1 week ago
parent
commit
5cda3747c6
  1. 5
      src/components/SetLeftMenu.vue
  2. 19
      src/router/index.js

5
src/components/SetLeftMenu.vue

@ -205,7 +205,10 @@ export default {
background: #FFFFFF;
box-shadow: 0px 0px 11px 2px rgba(147, 147, 147, 0.11);
}
ul{
height: 100%;
overflow-y: auto;
}
.ceshi {
// animation: fadeInOut 2s infinite;
}

19
src/router/index.js

@ -8,7 +8,7 @@ import HomeView from '../views/HomeView.vue';
Vue.use(VueRouter)
// 侧边导航黑名单
const blackSliderList = [
'/register','/franchise'
'/register', '/franchise'
];
// 一级路由
let first_child_router = []
@ -17,7 +17,7 @@ const blackHeaderList = [
'/franchise'
];
const blackFooterList = [
'/','/franchise'
'/', '/franchise'
];
// const whiteSlideList = ['/', '/ui',
// '/agent/siteList',
@ -44,9 +44,9 @@ const routes = [{
path: '/',
name: '首页',
component: HomeView,
isFirst:true,//是否属于一级路由
isFirst: true, //是否属于一级路由
meta: {
title: '首页',//面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
hideBreadcrumb: true // 是否隐藏面包屑
}
},
@ -60,7 +60,7 @@ const routes = [{
{
path: '/ui',
name: 'ui组件',
isFirst:true,
isFirst: true,
component: () => import( /* webpackChunkName: "ui" */ '../views/elementGroups.vue'),
meta: {
title: '公共组件示例',
@ -71,7 +71,7 @@ const routes = [{
{
path: '/agent/siteList',
name: '站点列表',
isFirst:true,
isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteList.vue'),
meta: {
title: '站点列表',
@ -353,9 +353,10 @@ router.beforeEach((to, from, next) => {
store.commit('SET_SIDEBAR', false); // 黑名单内页面不显示侧边栏
} else {
store.commit('SET_SIDEBAR', true); // 其他页面显示侧边栏
if(first_child_router.length > 0){
first_child_router.forEach(item=>{
if(item.path == to.path){
// 一级页面 侧边栏显示 统一化
if (first_child_router.length > 0) {
first_child_router.forEach(item => {
if (item.path == to.path) {
store.commit('SET_CUSTOMIZE', false);
store.commit('SET_SLIDER_MENU', 'menuData');
}

Loading…
Cancel
Save