Browse Source

Merge pull request '修改侧边栏滚动效果' (#55) from zq-breadcrumb into master

Reviewed-on: #55
zq-ui
zhangqi 1 week ago
parent
commit
a8885a79c3
  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; background: #FFFFFF;
box-shadow: 0px 0px 11px 2px rgba(147, 147, 147, 0.11); box-shadow: 0px 0px 11px 2px rgba(147, 147, 147, 0.11);
} }
ul{
height: 100%;
overflow-y: auto;
}
.ceshi { .ceshi {
// animation: fadeInOut 2s infinite; // animation: fadeInOut 2s infinite;
} }

19
src/router/index.js

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

Loading…
Cancel
Save