Vue中better-scroll实现左右侧联动
```javascript
<script>
import BScroll from 'better-scroll'
export default {
watch: {
menus() {
this.$nextTick(() => {
this._initRightLiTops()
this._initBScroll()
})
},
},
methods: {
_initBScroll() {
this.leftBScroll = new BScroll('.menu-left', {
click: true,
mouseWheel: true,
probeType: 3,
})
this.rightBScroll = new BScroll('.menu-right', {
click: true,
mouseWheel: true,
probeType: 3,
})
this.rightBScroll.on('scroll', (pos) => {
var scrollY = Math.abs(pos.y)
for (var i = 0; i < this.rightLiTops.length - 1; i++) {
if (
scrollY >= this.rightLiTops[i] &&
scrollY < this.rightLiTops[i + 1]
) {