ysh 2 年之前
父節點
當前提交
c7cb6622d7
共有 1 個文件被更改,包括 11 次插入4 次删除
  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')