在执行uni.switchTab 跳转到此页面后会再执行以下方法
const query = uni.createSelectorQuery().in(this);
就会出现这个错误
17:48:02.856 [system]TypeError: Cannot read property '$vm' of undefined
at a (http://localhost:8081/static/js/chunk-vendors.js:186:463928)
at v (http://localhost:8081/static/js/chunk-vendors.js:186:394436)
at Object.createSelectorQuery (http://localhost:8081/static/js/chunk-vendors.js:186:83074)
at VueComponent.loadViewHeight (webpack-internal:///C:\Users\Administrator\Desktop\RebateAPP\js\index.js:713:21)
at VueComponent.tabIndex (webpack-internal:///C:\Users\Administrator\Desktop\RebateAPP\js\index.js:133:12)
at Watcher.run (http://localhost:8081/static/js/chunk-vendors.js:8053:19)
at flushSchedulerQueue (http://localhost:8081/static/js/chunk-vendors.js:7795:13)
at Array.<anonymous> (http://localhost:8081/static/js/chunk-vendors.js:5424:12)
at flushCallbacks (http://localhost:8081/static/js/chunk-vendors.js:5350:14)
at <anonymous>
越王够贱 (作者)
是在onread后调用的差不多页面加载后半分钟才调用 ,本身没有问题 ,但是有时候切换几遍就会出现这个问题
2020-12-03 18:20
越王够贱 (作者)
而且 后面调用也会出问题
2020-12-03 18:21
DCloud_UNI_GSQ
回复 越王够贱: 有没有相关的测试工程和 测试步骤
2020-12-03 18:26
tikyz
回复 DCloud_UNI_GSQ: 这问题后来解决了吗
2022-04-19 02:15