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

数据是没问题的 单独push 不是对象没错啊
this.$store.state.playList.unshift(this.$store.state.chosenList.songname)
console.log( this.$store.state.playList)

但是这样追加进数组出错 为什么
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
先确保this.$store.state.playList是一个数组对象,可以先console.log()出来看看
据我所知,this.$store.state.xxx,这里xxx应该是你export的一个state中的区块空间命名,一般是一个对象,在这个对象中,再去定义内部属性数组对象进行操作
你把firefox换成chrome应该就能看到数据了.
我猜测是firefox问题.