fixed #1842
This commit is contained in:
parent
7b3d5ec124
commit
bdfab3b99e
2 changed files with 85 additions and 60 deletions
|
@ -150,7 +150,7 @@
|
|||
const index = this.navList.findIndex((nav) => nav.name === this.activeKey);
|
||||
const prevTabs = this.$refs.nav.querySelectorAll(`.${prefixCls}-tab`);
|
||||
const tab = prevTabs[index];
|
||||
this.barWidth = parseFloat(tab.offsetWidth);
|
||||
this.barWidth = tab ? parseFloat(tab.offsetWidth) : 0;
|
||||
|
||||
if (index > 0) {
|
||||
let offset = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue