Explorar el Código

Merge remote-tracking branch 'origin/master'

wangguoyu hace 4 años
padre
commit
e0d3483778
Se han modificado 3 ficheros con 15 adiciones y 1 borrados
  1. 1 1
      assets/scss/cus-client/cus-client-common.scss
  2. 7 0
      layouts/templateA.vue
  3. 7 0
      layouts/templateB.vue

+ 1 - 1
assets/scss/cus-client/cus-client-common.scss

@@ -151,6 +151,7 @@ h1,h2,h3,h4,h5,h6,p{font-weight:normal;margin: 0;}
         line-height: 80px;
         margin: 0 10px;
         padding: 0 6px;
+        a{height: inherit;display: inline-block;}
       }
       >.el-menu-item.is-active{
         @include setThemeColorBase("color", 0);
@@ -162,7 +163,6 @@ h1,h2,h3,h4,h5,h6,p{font-weight:normal;margin: 0;}
   //头部左侧区域
   .head-left{
     display: flex;
-
     //头部图标
     a>i{width: 160px;height: 70px;display: inline-block;background-image: url("~static/images/client/component/nav-logo.svg");background-repeat: no-repeat;background-position: center;}
   }

+ 7 - 0
layouts/templateA.vue

@@ -17,6 +17,13 @@
       Mtafooter,
       Mtaheader
     },
+    //监测路由变化,滚动条置于最上方
+    watch: {
+      $route: function(to, from) {
+        document.body.scrollTop = 0;
+        document.documentElement.scrollTop = 0;
+      }
+    },
   }
 </script>
 <style lang="scss" scoped>

+ 7 - 0
layouts/templateB.vue

@@ -17,6 +17,13 @@
       Mtafooter,
       Mtaheader
     },
+    //监测路由变化,滚动条置于最上方
+    watch: {
+      $route: function(to, from) {
+        document.body.scrollTop = 0;
+        document.documentElement.scrollTop = 0;
+      }
+    },
   }
 </script>
 <style lang="scss" scoped>