Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

单音频异步请求,报错,但是音频能播放,Invalid prop: custom validator check failed for prop "music". #222

Open
xuhua1212 opened this issue Aug 4, 2020 · 5 comments

Comments

@xuhua1212
Copy link

单音频异步请求,报错,但是音频能播放
报错:,Invalid prop: custom validator check failed for prop "music".
实在是不知道什么原因,希望作者大大能指点一下

@steeveen
Copy link

+1

@EvilDjango
Copy link

就是组件会检查music这个属性,检查失败了,所以报错。我的解决方式是:把初始的music对象需要的属性都写上,值设为非空字符串。如下:
music: {
title: ' ',
artist: ' ',
src: ' ',
pic: ' ',
}

@iiesx
Copy link

iiesx commented Sep 13, 2020

+1

@iiesx
Copy link

iiesx commented Sep 13, 2020

异步请求加载初始化music,报上面的错误,而且请求到数据后,封面都加载显示了,点击播放时NotSupportedError: The element has no supported sources.

@SuccessorZailong
Copy link

SuccessorZailong commented Dec 17, 2020

<aplayer v-if="music.src" :music="music"/>

建议 保证 music 实例化后,再渲染 aplayer 组件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants