|
@@ -1078,7 +1078,7 @@ export default {
|
|
|
calcStickyTop () {
|
|
|
const tabs = this.$el.querySelector('.tabs.sticky-tab-container')
|
|
|
if (tabs) {
|
|
|
- this.scrollTopInfo.stickyTop = tabs.offsetTop
|
|
|
+ this.scrollTopInfo.stickyTop = tabs.offsetTop - 64
|
|
|
}
|
|
|
},
|
|
|
recoverScrollTop (targetActiveName) {
|
|
@@ -1098,7 +1098,12 @@ export default {
|
|
|
this.scrollTopInfo[tab] = scrolled
|
|
|
},
|
|
|
beforeTabLeave (targetActiveName) {
|
|
|
- this.recordScrollTop(this.tabActiveName)
|
|
|
+ // 修复使用this.tabActiveName='2'跳转时,this.tabActiveName取值错误问题
|
|
|
+ let currentTab = '1'
|
|
|
+ if (targetActiveName === '1') {
|
|
|
+ currentTab = '2'
|
|
|
+ }
|
|
|
+ this.recordScrollTop(currentTab)
|
|
|
if (targetActiveName === '1') {
|
|
|
// 恢复到默认位置
|
|
|
this.recoverScrollTop(targetActiveName)
|