<template>
  <div class="layout-no-cols scoll right-detail-tabs">
    <el-toolbar>
      <el-button @click="$router.back()" type="primary" size="medium" round class="shadow-primary"><i class="fa fa-chevron-left"></i> 返回上页</el-button>
    </el-toolbar>
    <el-tabs class="tabs-wrap" v-model="activeTabs" @tab-click="changeTabClickHandler">
      <el-tab-pane name="basic">
        <span slot="label">
          <i class="fa fa-wpforms"></i>基本信息</span>
        <index-basic :tab-name="activeTabs" :catalog-id="ID">
        </index-basic>
      </el-tab-pane>
      <!-- <el-tab-pane name="config">
        <span slot="label">
          <i class="fa fa-cog"></i>索引设置</span>
        <index-config :tab-name="activeTabs">
        </index-config>
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>
<script>
// import IndexConfig from './indexConfig.vue'
import IndexBasic from './indexBasic.vue'
export default {
  components: {
    'index-basic': IndexBasic
    //  'index-config': IndexConfig
  },
  props: {
    catalogId: {
      type: [Number, String],
      required: true
    }
  },
  computed: {
    ID: {
      get() {
        return parseInt(this.catalogId)
      }
    }
  },
  data() {
    return {
      activeTabs: 'basic'
    }
  },
  methods: {
    // tab分页条点击事件
    changeTabClickHandler(tab, event) {
      this.activeTabs = tab.name
    }
  }
}
</script>
<style scoped>

</style>
