index.vue 799 Bytes

<template>
  <div>
    <GLTabs v-model="tabId" @tab-click="changeTab" :tabPaneList="tabPaneList"></GLTabs>
    <component :is="tabName" class="main-wrap"></component>
  </div>
</template>

<script>
import withdrawList from './list'
import approveList from './approve'
export default {
  components: { withdrawList, approveList },
  data() {
    return {
      tabId: '1',
      tabName: 'withdrawList',
      tabPaneList: [
        { name: '1', label: '提现列表' },
        { name: '2', label: '积分提现审批' }
      ]
    }
  },

  mounted() {},
  methods: {
    changeTab() {
      const arr = {
        1: 'withdrawList',
        2: 'approveList'
      }
      this.tabName = arr[+this.tabId]
    }
  }
}
</script>
<style scoped lang='scss'>
.main-wrap{
  margin-top: 16px;
}
</style>