this.$nextTick写在created钩子函数才会生效?
created() {
this.classMap=[‘decrease’,‘discount’,‘special’,‘invoice’,‘guarantee’];
// console.log(this.classMap[this.goods[this.item]]);
this.axios.get(‘api/goods’).then((response) => {
// console.log(response);
if(response.data.errno==ERR_OK){
this.goods=response.data.data;
// console.log(this.goods);
this.KaTeX parse error: Expected '}', got 'EOF' at end of input: …w BScroll(this.refs.menuWrapper,{
click:true
});
this.foodsScroll=new BScroll(this.$refs.foodsWrapper,{
probeType:3//scroll在滚动的时候,实时能告诉我们滚动的位置
});
this._calculateHeight();
this.foodsScroll.on(‘scroll’,(pos) => {
this.scrollY=Math.abs(Math.round(pos.y));
})
})
}
})
},