index.vue
799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<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>