vue-aplayer报错:custom validator check failed for prop music.

vue-aplayer报错:Invalid prop: custom validator check failed for prop "music".
我是使用vue-aplayer音乐播放器,在html页面可以正常使用,改成.vue格式就各种错误。
image.png

原来的代码:
` <div id="player">
<aplayer :music="music"
:list="list"
:showLrc="true"
:controls="false"
:autoplay="true"
/>
</div>

<script>
Vue.component('aplayer', VueAPlayer);
const app = new Vue({

    el: '#app',  

data: {

        music: "",  

list: [],
keyword: ""
},
`

现在改成.vue文件:
` <div id="player">
<aplayer :music="music"
:list="list"
:showLrc="true"
:controls="false"
:autoplay="true"
/>
</div>

<script>
import aplayer from 'vue-aplayer'

export default {

name: "music",  

components: {

    aplayer  

},
data() {

    return{  
        music: {},  

list: [],
keyword: ''
}

},  

`
改了半天还是没有找到原因。不太会用这个东西

待解决 悬赏分:0 - 离问题结束还有 348天19小时43分1秒
反对 0举报 0 收藏 0

我来回答

回答1