Use visibility instead of display
This commit is contained in:
parent
82278172bb
commit
3ce6b446d3
1 changed files with 4 additions and 8 deletions
|
@ -146,7 +146,7 @@
|
||||||
},
|
},
|
||||||
barStyle () {
|
barStyle () {
|
||||||
let style = {
|
let style = {
|
||||||
display: 'none',
|
visibility: 'hidden',
|
||||||
width: `${this.barWidth}px`
|
width: `${this.barWidth}px`
|
||||||
};
|
};
|
||||||
if (this.type === 'line') style.display = 'block';
|
if (this.type === 'line') style.display = 'block';
|
||||||
|
@ -388,14 +388,10 @@
|
||||||
const nextIndex = Math.max(this.navList.findIndex(tab => tab.name === this.focusedKey), 0);
|
const nextIndex = Math.max(this.navList.findIndex(tab => tab.name === this.focusedKey), 0);
|
||||||
[...this.$refs.panes.children].forEach((el, i) => {
|
[...this.$refs.panes.children].forEach((el, i) => {
|
||||||
if (nextIndex === i) {
|
if (nextIndex === i) {
|
||||||
[...el.children].forEach(child => child.style.display = 'block');
|
[...el.children].forEach(child => child.style.visibility = 'visible');
|
||||||
setTimeout(() => {
|
setTimeout(() => focusFirst(el, el), transitionTime);
|
||||||
focusFirst(el, el);
|
|
||||||
}, transitionTime);
|
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
[...el.children].forEach(child => child.style.visibility = 'hidden');
|
||||||
[...el.children].forEach(child => child.style.display = 'none');
|
|
||||||
}, transitionTime);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue