a***@163.com
a***@163.com
  • 发布:2019-07-29 13:00
  • 更新:2021-10-27 16:30
  • 阅读:1655

createSelectorQuery 在 nvue下怎么用?

分类:nvue

android下报错:
An SelectorQuery call is ignored because no proper page or component is found. Please considering using SelectorQuery.in to specify a proper one。

小程序和H5都正常

2019-07-29 13:00 负责人:无 分享
已邀请:
1***@163.com

1***@163.com - 12345上山打老虎

同问

陈晨1

陈晨1

如过是在页面中使用,需要在 onReady 之后执行。

如果是在组件中使用,需要加上 .in(this) 如:uni.createSelectorQuery().in(this); 并在 mounted 之后执行。

  • 1***@163.com

    subNVues 它不是全屏页面,也不是组件,就是一个原生子窗体。它是一个 nvue 页面

    2019-09-04 15:19

1***@163.com

1***@163.com - 啊啊啊

你好 请问你可以用了吗

1***@qq.com

1***@qq.com

我这边测试没问题了

uni.getSystemInfo({  
    success: res => {  
        uni.createSelectorQuery().in(this).select("#wate")  
        boundingClientRect(searchBarBoundRect => {  
            console.log(searchBarBoundRect.height)  
        }).exec();  
    }  
});
1***@163.com

1***@163.com

请问nvue页面怎么使用解决了吗

该问题目前已经被锁定, 无法添加新回复