浏览代码

组件flex样式优化

zhaihaoyi 6 年之前
父节点
当前提交
ebf6a0a421
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      src/lib/RouterTab/components/RouterTab.js
  2. 2 2
      src/lib/RouterTab/scss/RouterTab.scss

+ 1 - 0
src/lib/RouterTab/components/RouterTab.js

@@ -158,6 +158,7 @@ export default {
     this.updateActivedTab()
 
     this.$router.beforeEach(this.routerPageLeaveGuard)
+    this.$nextTick(this.adjust)
   },
 
   mounted () {

+ 2 - 2
src/lib/RouterTab/scss/RouterTab.scss

@@ -17,7 +17,6 @@ $color-primary: #409eff;
     border-bottom: 2px solid $color-primary;
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
     transition: all .2s ease-in-out;
-    flex: none;
 
     &.is-scroll {
       padding: 0 $slideW;
@@ -183,7 +182,8 @@ $color-primary: #409eff;
   // 页面容器
   &-container {
     position: relative;
-    flex: auto;
+    flex: 1;
+    height: 0;
     overflow-x: hidden;
     overflow-y: auto;
     background: #fff;