<template>
  <div>
    <div class="btn-tabs-boxs">
      <template v-for="(item, index) in data.options">
        <div :key="index" :class="tabsIndex == index && 'active'" @click="tabs(index)">{{ item }}</div>
      </template>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      tabsIndex: 0
    }    
  },
  mounted() {},
  methods: {
    tabs(n) {
      this.tabsIndex = n
      this.$emit('tabsChange', n)
    }
  }
}
</script>
<style lang="scss" scoped>
.btn-tabs-boxs{
    // padding: 24px 0 30px;
    display: flex;
    justify-content: center;
    div{
      cursor: pointer;
      text-align: center;
      width: 200px;
      height: 56px;
      background: #F9F9F9;
      font-size: 18px;
      color: #666666;
      line-height: 56px;
      &.active{
        color: #fff;
        background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
      }
    }
  }
</style>
