yugueilou

js页面
//创建节点选择器
var query = wx.createSelectorQuery();
//选择id
var that = this;
query.select(\'.every\').boundingClientRect(function (rect) {
// console.log(rect.width)
that.setData({
height: rect.width + \'px\'
})
}).exec();
wxml页面

<view class=\'every\' style=\'height:{{height}}\'></view>
原文链接:https://blog.csdn.net/qq_35181466/article/details/80701767

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-07
  • 2021-12-09
  • 2022-02-09
  • 2022-01-07
  • 2022-02-07
  • 2021-09-15
猜你喜欢
  • 2022-01-07
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案