<template>
  <!-- 播放器 -->
  <view class="audio" :style="{ 'background': (bg ? `url(${bg}) no-repeat 100% / 100%` : '#EEE') }">
    <image class="pic" :src="pic" />
    <view class="info">
      <view class="song">{{ name }}</view>
      <view class="singer">暂无歌手名</view>
    </view>
    <image class="btn" src="../../static/play.png" />
  </view>
</template>

<script>
export default {
  props: {
    bg: String,
    pic: String,
    name: String
  },
  data() {
    return {

    }
  },
  mounted() {

  }
}
</script>

<style lang="scss" scoped>
.audio {
  width: 100%;
  height: 104px;
  padding: 8px 16px 8px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-weight: bold;

  .pic {
    width: 88px;
    height: 88px;
    border-radius: 8px;
    margin-right: 16px;
  }

  .info {
    width: calc(100% - 144px);
    color: #000;

    .song {
      font-size: 16px;
      margin-bottom: 16px;
    }

    .singer {
      font-size: 12px;
      opacity: 0.6;
    }
  }

  .btn {
    width: 40px;
    height: 40px;
  }
}
</style>