Browse Source

fix: 优化tab底部滚动条逻辑 (#580)

* fix: 优化tab设置底部滚动条宽度

* fix: 优化tab底部滚动条逻辑
zhenyulei 4 years ago
parent
commit
553ece3e30
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/packages/tab/tab.vue

+ 1 - 0
src/packages/tab/tab.vue

@@ -215,6 +215,7 @@ export default {
         // this.tapWidth = tapWidth / 2 - this.navWidth / 2;
         // this.tapWidth = tapWidth / 2 - this.navWidth / 2;
         if (this.lineWidth > 0 && this.lineWidth < this.navWidth) {
         if (this.lineWidth > 0 && this.lineWidth < this.navWidth) {
           this.initX = parseInt((this.navWidth - this.lineWidth) / 2 + this.navWidth * this.defIndex);
           this.initX = parseInt((this.navWidth - this.lineWidth) / 2 + this.navWidth * this.defIndex);
+          this.tapWidth = tapWidth / 2 - this.navWidth / 2;
         } else {
         } else {
           this.initX = parseInt(this.navWidth * this.defIndex);
           this.initX = parseInt(this.navWidth * this.defIndex);
           this.tapWidth = tapWidth / 2 - this.navWidth / 2;
           this.tapWidth = tapWidth / 2 - this.navWidth / 2;