单音频异步请求,报错,但是音频能播放,Invalid prop: custom validator check failed for prop "music".
xuhua1212 opened this issue · comments
icode commented
单音频异步请求,报错,但是音频能播放
报错:,Invalid prop: custom validator check failed for prop "music".
实在是不知道什么原因,希望作者大大能指点一下
steeveen commented
+1
Django Hunt commented
就是组件会检查music这个属性,检查失败了,所以报错。我的解决方式是:把初始的music对象需要的属性都写上,值设为非空字符串。如下:
music: {
title: ' ',
artist: ' ',
src: ' ',
pic: ' ',
}
iiesx commented
+1
iiesx commented
异步请求加载初始化music,报上面的错误,而且请求到数据后,封面都加载显示了,点击播放时NotSupportedError: The element has no supported sources.
SuccessorZailong commented
<aplayer v-if="music.src" :music="music"/>
建议 保证 music 实例化后,再渲染 aplayer 组件。