1.根据值查索引 indexOf
let id_index
= this.item_list
.indexOf(this.id
)
2.JavaScript反向排序 reverse()
let arr
=res
.data
.data
.dataList
.reverse()
3.vue回到顶部
window
.scroll(0, 0)
4.查看元素是否在数组中 includes
this.item_list
.includes(this.id
)
转载请注明原文地址:https://tech.qufami.com/read-10987.html