<template>
  <div>
    <el-tabs v-model="activeTab" @tab-click="handleClick">
      <!-- 全部 -->
      <el-tab-pane :label="$t('dic:label:all')" name="/dictionary/newDictionary/list">
        <dictList v-if="activeTab == '/dictionary/newDictionary/list'" />
      </el-tab-pane>
      <!-- 下拉框字典 -->
      <el-tab-pane :label="$t('dic:label:select')" name="/dictionary/newDictionary/select">
        <dictSelect v-if="activeTab == '/dictionary/newDictionary/select'" />
      </el-tab-pane>
      <!-- 枚举字典 -->
      <el-tab-pane :label="$t('dic:label:enum')" name="/dictionary/newDictionary/enum">
        <dictEnum v-if="activeTab == '/dictionary/newDictionary/enum'" />
      </el-tab-pane>
      <!-- 布尔字典 -->
      <el-tab-pane :label="$t('dic:label:bool')" name="/dictionary/newDictionary/bool">
        <dictBool v-if="activeTab == '/dictionary/newDictionary/bool'" />
      </el-tab-pane>
      <!-- 字典类型配置 -->
      <el-tab-pane :label="$t('dic:label:config')" name="/dictionary/newDictionary/config">
        <dictConfig v-if="activeTab == '/dictionary/newDictionary/config'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import dictList from './list/index'
import dictSelect from './select/index'
import dictEnum from './enum/index'
import dictBool from './bool/index'
import dictConfig from './setting/index'
export default {
  components: {
    dictList, dictSelect, dictEnum, dictBool, dictConfig
  },
  data() {
    return {
      activeTab: '/dictionary/newDictionary/list'
    }
  },
  created() {
  },
  methods: {
    handleClick(tab) {
    }
  }
}
</script>

<style lang="scss">
  .trial-detail{
    height: 100%;
    // box-sizing: border-box;
    // overflow-y: auto;
    .el-tabs{
      height: 100%;
      display: flex;
      flex-direction: column;
      .el-tabs__header {
        margin: 0;
        height: 40px;
      }
      .el-tabs__content{
        flex: 1;
        .el-tab-pane{
          height: 100%;
          overflow-y: auto;
          box-sizing: border-box;
        }
      }
    }
  }
</style>
