currentSong
来源:7-4 播放器基础样式及歌曲数据的应用
hope是希望的意思啦
2018-05-10
老师我的currentSong里面没东西啊,对比了源码好几次, 然后打印出来都是空对象这一般是什么问题造成了
(控制台也没有报错啥的)
2回答
-
hope是希望的意思啦
提问者
2018-05-10
<template>
<div class="player" v-show="playList.length>0">
<div class="normal-player" v-show="fullScreen" >
<div class="background">
<img width="100%" height="100%" :src="currentSong.iamge" alt="">
</div>
<div class="top">
<div class="back">
<i class="icon-back"></i>
</div>
<h1 class="title"></h1>
<h2 class="subtitle"></h2>
</div>
<div class="middle">
<div class="middle-l">
<div class="cd-wrapper">
<div class="cd">
<img src="" alt="" class="image">
</div>
</div>
</div>
</div>
<div class="bottom">
<div class="operators">
<div class="icon i-left">
<i class="icon-sequence"></i>
</div>
<div class="icon i-left">
<i class="icon-sequence"></i>
</div>
<div class="icon i-center">
<i class="icon-play"></i>
</div>
<div class="icon i-right">
<i class="icon-next"></i>
</div>
<div class="icon i-right">
<i class="icon-not-favorite"></i>
</div>
</div>
</div>
</div>
<div class="mini-player" v-show="!fullScreen">
<div class="icon">
<img src="" alt="">
</div>
<div class="text">
<h2 class="name"></h2>
<p class="desc"></p>
</div>
<div class="control">
</div>
<div class="control">
<i class="icon-palylist"></i>
</div>
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
computed: {
...mapGetters([
'fullScreen', //是否全屏
'playList', //播放列表
'currentSong'
])
},
mounted() {
console.log(this.playList)
}
}
</script>
00 -
ustbhuangyi
2018-05-10
贴一下你的相关代码
032018-05-11
相似问题