@@ -59,7 +59,7 @@ | |||
//获取当前页面路径 | |||
let path = this.$route.path; | |||
//判断是否在可滑动切换页面的列表中 | |||
if(allPage.indexOf(path)==-1 || scrollTop){ | |||
if(allPage.indexOf(path)==-1 || scrollTop || this.$store.state.menuState){ | |||
return; | |||
} | |||
//判断是否只可向一个方向滑动 |
@@ -92,9 +92,11 @@ | |||
// } | |||
}, | |||
open() { | |||
this.$store.state.menuState = true; | |||
this.$refs.sidebar.style.left = '0%'; | |||
}, | |||
close() { | |||
this.$store.state.menuState = false; | |||
this.$refs.sidebar.style.left = '-100%'; | |||
}, | |||
show1(index) { |
@@ -5,6 +5,7 @@ Vue.use(Vuex) | |||
export default new Vuex.Store({ | |||
state: { | |||
menuState:false, | |||
imgBaseUrl: '', | |||
pagePath: [ | |||
[ |