this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
- 发布:2022-12-23 18:20
- 更新:2022-12-23 20:46
- 阅读:434
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows 10
HBuilderX类型: 正式
HBuilderX版本号: 3.6.4
浏览器平台: Chrome
浏览器版本: 86.0.4240.198
项目创建方式: HBuilderX
示例代码:
操作步骤:
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
预期结果:
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
实际结果:
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + id + ' .click-event')
.boundingClientRect(data => {
bug描述:
[Vue warn]: Error in event handler for "service.requestComponentInfo": "SyntaxError: Failed to execute 'matches' on 'Element': '.1aw62f .click-event' is not a valid selector."
1 个回复
DCloud_UNI_Anne
请检查选择器,如果还未解决提供最小化复现示例(上传附件)【bug优先处理规则】https://ask.dcloud.net.cn/article/38139