Merge pull request #14240 from iamkun/bugfix/fix_tab_bar

Tabs: fix error tab bar style
pull/14256/head
Zhi Cun 2019-01-29 15:05:59 +08:00 committed by GitHub
commit ce878f29f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -15,7 +15,6 @@
computed: {
barStyle: {
get() {
if (!this.$parent.$refs.tabs) return {};
let style = {};
let offset = 0;
let tabSize = 0;
@ -25,7 +24,7 @@
return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
};
this.tabs.every((tab, index) => {
let $el = arrayFind(this.$parent.$refs.tabs, t => t.id.replace('tab-', '') === tab.paneName);
let $el = arrayFind(this.$parent.$refs.tabs || [], t => t.id.replace('tab-', '') === tab.paneName);
if (!$el) { return false; }
if (!tab.active) {