Przeglądaj źródła

Tabs: fix active bar width when only one tab

Leopoldthecoder 7 lat temu
rodzic
commit
f6ba1efea1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/tabs/src/tab-bar.vue

+ 1 - 1
packages/tabs/src/tab-bar.vue

@@ -33,7 +33,7 @@
               return true;
             } else {
               tabSize = $el[`client${firstUpperCase(sizeName)}`];
-              if (sizeName === 'width') {
+              if (sizeName === 'width' && this.tabs.length > 1) {
                 tabSize -= (index === 0 || index === this.tabs.length - 1) ? 20 : 40;
               }
               return false;