// 组件创建完后调用
mounted () { // mounted生命周期创建之后
this.scroll = new BScroll(document.queryselector('.wrapper'),{
probeType: 3,
pullupload: true
})
this.scroll.on('scroll', (position) => {
console.log(position);
})
}
better-scroll 装的2.0版本的,报错:
vue.runtime.esm.js?c320:619
[Vue warn]: Error in mounted hook: "TypeError: document.queryselector is not a function"
found in
at src/views/category/Category.vue
at src/App.vue
他说我document.queryselector有问题,请问这里该怎么写?