<template>
  <app-tabs ref="appTab" :tab-list="tabList" class="flex-col fullheight" @tabClick="changeTab">
    <template #tabPane="{ item }">
      <component :is="item.name" v-if="activeName === item.name" :ref="item.name" />
    </template>
  </app-tabs>
</template>

<script>
import Provider from '../shareLog/Provider/index.vue';

import Resource from '../shareLog/Resource/index.vue';

export default {
  components: { Provider, Resource },
  data() {
    return {
      // ...TABLE_CONFIG, // table相关
      activeName: 'Provider',
      // providerRow: null,
      tabList: [
        { label: '接口调用', name: 'Provider' },
        { label: '离线文件下载调用', name: 'Resource' },
      ],
    };
  },
  computed: {
    currentConfig() {
      return '';
      // return this[this.configName]
    },
  },
  mounted() {},
  methods: {
    changeTab(tab) {
      this.activeName = tab.paneName;
    },
  },
};
</script>

<style lang="scss" scoped>
.com {
  transition: opacity 0.3s;
}

.leave {
  opacity: 0;
}
</style>
