ysh 2 anni fa
parent
commit
c7cb6622d7
1 ha cambiato i file con 11 aggiunte e 4 eliminazioni
  1. 11 4
      src/App.vue

+ 11 - 4
src/App.vue

@@ -19,14 +19,21 @@
       let that = this
       enquireScreen(deviceType => {
         // tablet
+        
         if (deviceType === 0) {
-          that.$store.commit('TOGGLE_DEVICE', 'mobile')
-          that.$store.dispatch('setSidebar', false)
+          that.$store.commit('TOGGLE_DEVICE', 'desktop')
+          that.$store.dispatch('setSidebar', true)
+          //暂时注释页面缩放时自动适应手机端
+          // that.$store.commit('TOGGLE_DEVICE', 'mobile')
+          // that.$store.dispatch('setSidebar', false)
         }
         // mobile
         else if (deviceType === 1) {
-          that.$store.commit('TOGGLE_DEVICE', 'mobile')
-          that.$store.dispatch('setSidebar', false)
+          that.$store.commit('TOGGLE_DEVICE', 'desktop')
+          that.$store.dispatch('setSidebar', true)
+          //暂时注释页面缩放时自动适应手机端
+          // that.$store.commit('TOGGLE_DEVICE', 'mobile')
+          // that.$store.dispatch('setSidebar', false)
         }
         else {
           that.$store.commit('TOGGLE_DEVICE', 'desktop')