Fixed #416 - TabMenu error when no route matches one of the menu paths
parent
b1bfa2fcb0
commit
5c847c0292
|
@ -76,9 +76,17 @@ export default {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
updateInkBar() {
|
updateInkBar() {
|
||||||
let tabHeader = this.$refs.nav.children[this.findActiveTabIndex()];
|
let activeTabIndex = this.findActiveTabIndex();
|
||||||
this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';
|
if (activeTabIndex !== null) {
|
||||||
this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px';
|
let tabHeader = this.$refs.nav.children[activeTabIndex];
|
||||||
|
this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';
|
||||||
|
this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$refs.inkbar.style.width = '0px';
|
||||||
|
this.$refs.inkbar.style.left = '0px';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in New Issue