页面渲染是正常的,打印却是undefined
- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
//删除明细
deleteDetail(e){
//e.currentTarget.dataset.index
var that = this
var pojos
console.log(“deleteDetail”)
console.log(that.data)
console.log(that.data.pojos0.lenght)
for (var i = 0; i<that.data.pojos0.lenght;i++){
if (i != e.currentTarget.dataset.index){
pojos.push(that.data.pojos0[i])
}
}
that.setData({
pojos0:pojos
})
}
模拟与真机上都调试过:页面渲染是正常的,打印出来却是 undefined