优化代码
This commit is contained in:
parent
28e1d7717d
commit
1d48c178c1
|
@ -155,9 +155,11 @@ export default {
|
|||
* 更新左侧菜单
|
||||
*/
|
||||
updateMenuStatus(index) {
|
||||
if (index != this.currentLeftIndex) {
|
||||
this.$emit("onScroll", this.data[index].id);
|
||||
}
|
||||
this.currentLeftIndex = index;
|
||||
this.scrollLeftTop = index * this.menuHeight - this.wrapHeight / 2;
|
||||
this.$emit("onScroll", this.data[index].id);
|
||||
},
|
||||
/**
|
||||
* 滚动监听
|
||||
|
|
Loading…
Reference in New Issue