v-show
根据表达式之真假值,切换元素的 display CSS 属性。
当条件变化时该指令触发过渡效果。
参考:条件渲染 - v-show
注意,v-show 不支持 <template> 元素,也不支持 v-else。
@scroll = scroll
scroll(e) {
this.scrollHeight = e.detail.scrollHeight;
}
showClasses(index){
this.showClassesIndex = index-1;
this.scrollTop = -this.scrollHeight * index;
}