保誠-保戶業務員媒合平台
Mila
2021-10-27 1fbe99ac8b1d46f2596f652d8b56d4e352b1522d
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
<template>
    <div>我的聯絡清單
        <el-tabs
            v-model="activeTabName"
            @tab-click="tabClick"
        >
            <el-tab-pane
                label="顧問清單"
                name="consultantList"
            >
            </el-tab-pane>
            <el-tab-pane
                label="最新留言"
                name="messageList"
            ></el-tab-pane>
        </el-tabs>
 
        <NuxtChild></NuxtChild>
    </div>
</template>
 
<script lang='ts'>
import { Vue, Component, Watch } from 'vue-property-decorator';
import { Route } from 'vue-router/types/router.d'
 
@Component
export default class ContactList extends Vue {
    activeTabName = 'consultantList'
 
    tabClick() {
        this.$router.push('/contactList/' + this.activeTabName)
    }
 
    @Watch('$route') watchRouter(currentRoute: Route) {
        const pathArray = currentRoute.fullPath.split('/');
        this.activeTabName = pathArray[pathArray.length - 1];
    }
 
}
</script>
 
<style lang="scss" scoped>
    .el-tabs__item:hover {
        color: #303133;
    }
</style>