o***@qq.com
o***@qq.com
  • 发布:2020-03-19 17:22
  • 更新:2020-03-19 17:22
  • 阅读:983

【报bug】掉坑里了,按照官方的方档编写自定义component组件,uniapp页面没有效果

分类:uni-app

掉坑里了,按照官方的方档编写自定义component组件,uniapp页面没有效果
在页面上调用:
methods:{
play:function(){
var b = weex.isRegisteredComponent("mycomponent");
uni.showModal({
content:'开始播放:'+b,
showCancel:false
});
const self = this;
self.$refs.mycompt.play({'text':'123'},result=>{
uni.showModal({
content:'调用成功',
showCancel:false
});
console.log('success');
self.rv = result
});
}
}
弹了提示b=true,但是页面没有显示textView效果,异步play方法,也提示错误:
thirdScriptError
16:35:45.920 undefined is not an object (evaluating 'self.$refs.mycompt.play'); [Component] Event Handler Error @ components/tipsoft-video/video#handleEvent
16:35:45.940 play
16:35:45.960 play@[native code]
16:35:46.001 forEach@[native code]
16:35:46.041 forEach@[native code]
16:35:46.061 handleEvent
16:35:46.081 safeCallback@weex createInstanceContext:4:425719
16:35:46.102 weex createInstanceContext:4:566466
16:35:46.122 __hookEvent@weex createInstanceContext:4:773
16:35:46.142 weex createInstanceContext:4:566435
16:35:46.162 weex createInstanceContext:4:569696
16:35:46.182 weex createInstanceContext:4:568970
16:35:46.202 n@weex createInstanceContext:4:171534
16:35:46.222 subscribeHandler@weex createInstanceContext:4:2190
16:35:46.249 weex createInstanceContext:3:88755
16:35:46.269 weex createInstanceContext:3:88776
16:35:46.289 N@weex createInstanceContext:3:8336
16:35:46.309 Se@weex createInstanceContext:3:23015
16:35:46.335 consume@(weex framework):1:1263
16:35:46.355 map@[native code]

2020-03-19 17:22 负责人:无 分享
已邀请:

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