SetData is not a function, changed the this direction and still reported an error.

May.27,2022

if you change the variable name self is also the keyword


, just print out the self directly, and you will understand


Why not use the arrow function

setTimeout(() => {
    wx.createSelectorQuery().select().boundingClientRect((rect) => {
        this.setData()
    })
}, 500)
Menu