vue1的写法
div class&#61;"menu-wrapper" v-el&#61;"menu-wrapper"><ul class&#61;"menu"><li v-for&#61;"item in goods" class&#61;"menu-item"><span class&#61;"text"><span v-if&#61;"item.type>0" class&#61;"icon" :class&#61;"classMap[item.type]">span>{{item.name}}span>li>ul>div>
vue2的写法
<div class&#61;"menu-wrapper" ref&#61;menuWrapper><ul><li v-for&#61;"(item,index) in goods" :key&#61;"index" class&#61;"menu-item"><span class&#61;"text border-1px"><span v-show&#61;"item.type>0" class&#61;"icon" :class&#61;"classMap[item.type]">span>{{item.name}}span>li>ul>div>
methods: {_initScroll() {this.menuScroll &#61; new BScroll(this.$refs.menuWrapper, {});this.foodsScroll &#61; new BScroll(this.$refs.foodsWrapper, {});}}