mirror of https://github.com/ElemeFE/element
Tabs: fix exception in scrollToActiveTab (#10187)
parent
b60c2cac8c
commit
bfd7d0236c
|
@ -81,6 +81,7 @@
|
||||||
if (!this.scrollable) return;
|
if (!this.scrollable) return;
|
||||||
const nav = this.$refs.nav;
|
const nav = this.$refs.nav;
|
||||||
const activeTab = this.$el.querySelector('.is-active');
|
const activeTab = this.$el.querySelector('.is-active');
|
||||||
|
if (!activeTab) return;
|
||||||
const navScroll = this.$refs.navScroll;
|
const navScroll = this.$refs.navScroll;
|
||||||
const activeTabBounding = activeTab.getBoundingClientRect();
|
const activeTabBounding = activeTab.getBoundingClientRect();
|
||||||
const navScrollBounding = navScroll.getBoundingClientRect();
|
const navScrollBounding = navScroll.getBoundingClientRect();
|
||||||
|
|
Loading…
Reference in New Issue