• Welcome to the eight year blog, I'm glad to meet you at the right age!
  • Due to the theme, QQ login partners will display the default avatar in the comments. Please go to the personal center and upload the avatar again.

The applet component cannot get the node using SelectAll

Code Notes barben 2 months ago (05-06) 108 views 0 comments

Shocked! Encapsulating a component, using Wx. Createselectorquery(). Selectall(). Boundingclientrect() to get an empty array!?

When you know it, it's surprising to say something unexpected!

Add the .in(this) that will do

 const query = wx.createSelectorQuery().in(this);
  query.selectAll(".area-item").boundingClientRect((rect) => {

Eight blogs that year, we've been there all the time
If the author does not indicate the original article, please indicate the link and source of this article
Applet component cannot get node using SelectAll - https://www.barben.cn/code/814.html
Like it( two )
Post my comments
Cancel comment
expression Mapping Bold Delete line Center Italics

You need to bring your nickname and email with you in the year of eight!

  • Nickname (required)
  • Email address (required)
  • website