【类 型】:fix
【主 题】:修复导航栏bug 未成功版本(之后会追溯 特做标记) 【描 述】: [原因]: [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
a87a70e057
commit
d2c0364cbf
@ -114,6 +114,8 @@
|
||||
arr: [], //记录 右边菜单每个item到顶部的距离
|
||||
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
|
||||
timer: null, // 定时器
|
||||
|
||||
isScrollingByClick: false, // 添加这个标志 解决点击左侧导航栏点击 右侧内容滚动之后 反过来影响左侧导致跳变
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
@ -171,7 +173,7 @@
|
||||
}
|
||||
if (index == this.current) return
|
||||
this.scrollRightTop = this.oldScrollTop
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(() => {
|
||||
this.scrollRightTop = this.arr[index]
|
||||
this.current = index
|
||||
this.leftMenuStatus(index)
|
||||
@ -263,7 +265,7 @@
|
||||
// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
|
||||
if (!height2 || scrollHeight >= height1 && scrollHeight < height2) {
|
||||
this.leftMenuStatus(i)
|
||||
return
|
||||
console.log('hi')
|
||||
}
|
||||
}
|
||||
}, 10)
|
||||
|
Loading…
Reference in New Issue
Block a user