Browse Source

bug修复

master
suizhijia 5 years ago
parent
commit
d7d413d70d
3 changed files with 4 additions and 1 deletions
  1. +1
    -1
      src/App.vue
  2. +2
    -0
      src/components/sidebar.vue
  3. +1
    -0
      src/store/index.js

+ 1
- 1
src/App.vue View File

//获取当前页面路径 //获取当前页面路径
let path = this.$route.path; let path = this.$route.path;
//判断是否在可滑动切换页面的列表中 //判断是否在可滑动切换页面的列表中
if(allPage.indexOf(path)==-1 || scrollTop){
if(allPage.indexOf(path)==-1 || scrollTop || this.$store.state.menuState){
return; return;
} }
//判断是否只可向一个方向滑动 //判断是否只可向一个方向滑动

+ 2
- 0
src/components/sidebar.vue View File

// } // }
}, },
open() { open() {
this.$store.state.menuState = true;
this.$refs.sidebar.style.left = '0%'; this.$refs.sidebar.style.left = '0%';
}, },
close() { close() {
this.$store.state.menuState = false;
this.$refs.sidebar.style.left = '-100%'; this.$refs.sidebar.style.left = '-100%';
}, },
show1(index) { show1(index) {

+ 1
- 0
src/store/index.js View File



export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
menuState:false,
imgBaseUrl: '', imgBaseUrl: '',
pagePath: [ pagePath: [
[ [

Loading…
Cancel
Save