9***@qq.com
9***@qq.com
  • 发布:2023-02-20 11:52
  • 更新:2023-02-20 11:54
  • 阅读:470

小程序$refs访问出错,Cannot read property 'dataset' of null

分类:uni-app

TypeError: Cannot read property 'dataset' of null
at vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:1276
at Array.forEach (<anonymous>)
at selectAllComponents (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:1275)
at VueComponent.get [as $refs] (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:1312)
at _callee2$ (index.js?t=wechat&s=1676861413183&v=e19cb1cf2b26dd73fac6fa3812a038e1:424)
at tryCatch (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:12619)
at Generator.<anonymous> (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:12700)
at Generator.next (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:12644)
at asyncGeneratorStep (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:12897)
at _next (vendor.js?t=wechat&s=1676861413183&v=591d992ae12dde3d2d482b1cdc4a1cb2:12916)(env: Windows,mp,1.06.2301040; lib: 2.29.2)

2023-02-20 11:52 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com (作者)

这个$refs里面是一串报错,app端和h5端访问都没问题的

  • 2***@qq.com

    解决了吗,我这也是这个错误

    2023-11-13 16:39

  • 9***@qq.com (作者)

    回复 2***@qq.com: 应该是组件内部产生了循环,导致$refs挂载错误了,我这边是data里面有个熟悉self:this这样引用了

    2024-02-05 09:44

要回复问题请先登录注册