请教老师
来源:5-20 tabs组件 - scrollView 的点击位移

从初级前端到架构
2021-11-24
.boundingClientRect((res)=>{
//res 是拿到的dom
console.log('res',res)
console.log('item',item)
item._slider = {
left: res.left + (res.width - this.defaultConfig.underLineWidth) /2
}
if(data.length - 1 === index){
this.tanToIndex();
}
})
这里的item和res 有什么区别?
写回答
1回答
-
你好
res 为遍历的 dom 属性对象,item 为数据源对象
00