小程序
小游戏
企业微信
微信支付
扫描小程序码分享
https://developers.weixin.qq.com/miniprogram/dev/framework/view/selector.html#WXML%E8%8A%82%E7%82%B9%E5%B8%83%E5%B1%80%E7%9B%B8%E4%BA%A4%E7%8A%B6%E6%80%81
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
命名不同的class名
传入一个字符串,用逗号隔开
let str = '.item1,.item2,.item3'
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
wx.createIntersectionObserver(this, {thresholds: [0, .5], selectAll: true}).relativeToViewport().observe('.item', (res) => {
console.log(res);
});
这种的并不是我想要的;我想获得一个数组当前在页面上的item.
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
命名不同的class名
传入一个字符串,用逗号隔开
let str = '.item1,.item2,.item3'
wx.createIntersectionObserver(this, {thresholds: [0, .5], selectAll: true}).relativeToViewport().observe('.item', (res) => {
console.log(res);
});
这种的并不是我想要的;我想获得一个数组当前在页面上的item.