x***@gmail.com
x***@gmail.com
  • 发布:2024-06-11 14:01
  • 更新:2024-06-11 14:01
  • 阅读:165

【报Bug】createSelectorQuery 报递归错误

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: macOS Sonoma 14.4.1 (23E224)

HBuilderX类型: 正式

HBuilderX版本号: 4.15

第三方开发者工具版本号: 1.06.2306020

基础库版本号: 2.25.3

项目创建方式: HBuilderX

示例代码:

const query = uni.createSelectorQuery().in(app);
query.select('.tg-sku-choose').boundingClientRect(data => {
//param.value.$el = data;
}).exec();

操作步骤:

创建组件(component)
在组件内使用计算属性(computed)
在计算属性内调用 createSelectorQuery

预期结果:

正常

实际结果:

vendor.js? [sm]:3610 Maximum recursive updates exceeded in component <detail>. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.(env: macOS,mp,1.06.2306020; lib: 2.25.3)

bug描述:

vendor.js? [sm]:3610 Maximum recursive updates exceeded in component <detail>. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.(env: macOS,mp,1.06.2306020; lib: 2.25.3)

使用了计算属性 computed,在计算属性内调用的 createSelectorQuery 就会报这个错误; 但是退回 3.8版本就不会有该问题

2024-06-11 14:01 负责人:无 分享
已邀请:

要回复问题请先登录注册