<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>
|