【微信小程序】获取标签宽高


let query = wx.createSelectorQuery();
        query.select('.map-list').boundingClientRect()
        query.exec(res=>{
        /*
           res= {
               id,
               width,
               height,
               top,
               bottom,
               left,
               right,
               dataset
           }
           */
            console.log('res3',res)
        })

你可能感兴趣的:(【微信小程序】获取标签宽高)