vue2中使用uni-popup,在onLoad方法里面调用显示popup弹窗,报错 Cannot read properties of undefined (reading 'open')"

1***@163.com
- 发布:2025-03-05 13:53
- 更新:2025-03-05 14:11
- 阅读:52

杨杨得亿 - 这个人很懒,什么都没有留下~
经测试,uni-popup组件没有问题
<uni-popup ref="inputDialog" type="center">
111111111111
</uni-popup>
onLoad() {
this.$nextTick(() => {
this.$refs.inputDialog.open()
})
},
排查onLoad其他代码
1***@163.com (作者)
我是在运行在H5上的,如果是在小程序上,是没有问题,但H5和app上,这个弹窗始终出不来
2025-03-05 14:14
1***@163.com (作者)
我已经找到问题,感谢你的提醒,谢谢哈
2025-03-05 14:28
杨杨得亿
回复 1***@163.com: 我测试的是h5
2025-03-05 14:28