<template>
  <el-tabs v-model="tabValue" v-if="!!tabName">
    <el-tab-pane v-for="(ti) in tabItems" :key="ti.value" :label="ti.label"></el-tab-pane>
  </el-tabs>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      tabValue: 0
    };
  },
  computed: {},
  watch: {
    tabValue(index) {
      this.$emit("change", { [this.tabName]: this.tabItems[index].value });
    }
  },
  props: {
    tabName: {},
    tabItems: {
      default() {
        return [];
      }
    }
  },
  methods: {},
  mounted() {}
};
</script>
<style lang="scss">
.k-search-table {

}
</style>
