Tabview bar fixes

pull/358/head
cagataycivici 2020-06-26 11:32:46 +03:00
parent 7dd6679849
commit 1f31675942
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@ export default {
updateInkBar() {
let tabHeader = this.$refs.nav.children[this.findActiveTabIndex()];
this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';
this.$refs.inkbar.style.left = tabHeader.offsetLeft + 'px';
this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px';
}
},
computed: {
@ -122,5 +122,6 @@ export default {
.p-tabmenu-ink-bar {
display: none;
z-index: 1;
}
</style>

View File

@ -86,7 +86,7 @@ export default {
updateInkBar() {
let tabHeader = this.$refs.nav.children[this.findActiveTabIndex()];
this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';
this.$refs.inkbar.style.left = tabHeader.offsetLeft + 'px';
this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px';
}
},
computed: {
@ -124,6 +124,7 @@ export default {
.p-tabview-ink-bar {
display: none;
z-index: 1;
}
.p-tabview-nav-link:focus {