<template>
  <!--选项-->
  <div class="music-btn">
    
    <span @click="$emit('changeList', 'playList')" :class="{hoverSpan:formComponent=='playList'}">正在播放</span>
    <span @click="$emit('changeList', 'topList')" :class="{hoverSpan:formComponent=='topList'}">推荐</span>
    <span @click="$emit('changeList', 'search')" :class="{hoverSpan:formComponent=='search'}">搜索</span>
    <!-- <span @click="$emit('changeList','userList')">
      我的歌单
    </span>
    <span class="show-960" @click="$emit('onClickLyric')">歌词</span>
    <span @click="$emit('changeList','historyList')">我听过的</span> -->
  </div>
</template>

<script>
export default {
  name: 'music-btn',
  props:{
    formComponent:{
      type:String,
    }
  }
}
</script>

<style lang="less" scoped>
.music-btn {
  width: 100%;
  height: 60px;
  font-size: 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  .hoverSpan{
    border-color: #fff;
    color: #fff;
  }
  span {
    display: inline-block;
    height: 40px;
    box-sizing: border-box;
    margin-right: 8px;
    padding: 0 23px;
    border: 1px solid @btn_color;
    color: @btn_color;
    border-radius: 2px;
    font-size: 14px;
    line-height: 40px;
    overflow: hidden;
    cursor: pointer;
    &:nth-last-of-type(1) {
      margin: 0;
    }
    &:hover,
    &.active {
      border-color: @btn_color_active;
      color: @btn_color_active;
    }
  }
  @media (min-width: 960px) {
    span.show-960 {
      display: none;
    }
  }
  @media (max-width: 960px) {
    span.show-960 {
      display: inline-block;
    }
  }
  @media (max-width: 768px) {
    height: 50px;
    span {
      height: 35px;
      padding: 0 10px;
      margin-right: 6px;
      line-height: 35px;
    }
  }
}
</style>
