- dom的渲染
<div v-for="(item, index) in List" class="item" :key="index>
</div>
- 合理对象的筛选
const machIndex = [];
this.List.forEach(item, index => {
if (item.value) {
machIndex.push(index)
}
})
- dom的操作(#app是整个页面的容器)
document.querySelector('#app').scrollTop = document.querySelectorAll('item')[machIndex[0]].offsetTop