<template>
  <div>
    <!-- //tab栏 -->
    <div class="naue_tab">
     <p @click="changeTab(tab)" v-for="tab in tabList"  :key="tab.index" :class="[tabIndex == tab.index? 'p' : '']">{{tab.name}}</p>
    </div>
    <div>
         <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "'Mytabs'",
  props:{
    tabList: Array,
    tabIndex: Number,
    queryParams:Object
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      //步骤条
      naueactive:2,
      tabNume:['线索信息','签约信息','在建信息','投产信息'],
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用

    };
  },
  created() {
  },
  methods: {
    //tab
    changeTab(index){
      this.$emit('changeTab', index)
    // this.tab = index
    }
  }
};
</script>

<style rel="stylesheet/scss" lang="scss">
  //tab
  .naue_tab{
    border-bottom: 1px solid #CDCDCD;
    display: flex;
    margin-top: 30px;
    padding: 0 10px;
    margin-bottom: 30px;
    p{
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: 400;
      color: #343434;
      padding: 11px 15px;
      margin: 0;
      cursor: pointer;
    }
    .p{
      border-bottom: 2px solid #1C84C6;
      margin-bottom: -1px;
    }
  }
</style>
