js 数组追加对象出错

this.$store.state.playList.unshift({songname:this.$store.state.chosenList.songname,url:this.$store.state.songurl})

https://img1.mukewang.com/5c07756100016f0601930156.jpg

数据是没问题的 单独push 不是对象没错啊

this.$store.state.playList.unshift(this.$store.state.chosenList.songname)

               

                console.log( this.$store.state.playList)

https://img.mukewang.com/5c07756e0001609c01650029.jpg

但是这样追加进数组出错 为什么

互换的青春
浏览 561回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript