index.vue
1.04 KB
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
42
43
44
45
46
47
48
49
50
<!-- 费用类目管理 -->
<template>
<d2-container class="account">
<div class="header" slot="header">
<el-tabs v-model="activeName">
<el-tab-pane label="分账类目" name="ledger" />
<el-tab-pane label="对账类目" name="reconciliation" />
</el-tabs>
</div>
<div>
<ledger-list v-if="activeName === 'ledger'" />
<reconciliation-list v-if="activeName === 'reconciliation'" />
</div>
</d2-container>
</template>
<script>
import ledgerList from './ledgerList'
import reconciliationList from './reconciliationList'
export default {
name: 'CostCategoryIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'ledger'
// activeName: 'reconciliation'
}
},
components: {
ledgerList,
reconciliationList
},
mounted() {
if (this.$route.params.activeName) {
this.activeName = this.$route.params.activeName
}
},
methods: {}
}
</script>
<style>
.account .el-tabs__header {
margin: 0;
padding: 0 20px;
}
</style>