 <!--tab选项卡-->
<template>
  <div>
    <el-tabs :class="showLimit?'tab-single':''" v-model="activeTabName" @tab-click="handleTabClick">
      <el-tab-pane v-for="(item,index) in tabData" :key="index" :label="item.label" :name="item.value"></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: 'enoTab',
  props: {
    tabData: Array,
    activeTab: {
      type: String,
      default: 'all'
    },
    showLimit: {
      type: Boolean,
      default: false
    }
  },

  data() {
    return {
      activeTabName: this.activeTab
    };
  },
  computed: {
  },
  watch: {
  },
  methods: {
    handleTabClick() {
      this.$emit('click', this.activeTabName)
    }
  },
};
</script>

<style scoped lang="less">
.tab-single {
  display: inline-block;
}
</style>
