From 8dc02e9b98a27857d5ec0c37a21eb12bb4d5e39d Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期五, 12 十一月 2021 12:43:44 +0800 Subject: [PATCH] update: [back-action-bar] 根據路由動態取得 label --- PAMapp/components/BackActionBar.vue | 68 ++++++++++++++++++++++++++++++++-- 1 files changed, 64 insertions(+), 4 deletions(-) diff --git a/PAMapp/components/BackActionBar.vue b/PAMapp/components/BackActionBar.vue index 84fd3ff..41c3cca 100644 --- a/PAMapp/components/BackActionBar.vue +++ b/PAMapp/components/BackActionBar.vue @@ -1,5 +1,65 @@ <template> - <div> - <el-button @click="$router.go(-1)">�����</el-button> - </div> -</template> \ No newline at end of file + <nav class="pam-back-action-bar"> + <a @click="$router.push('/')"> + <i class="icon-left"></i>{{ label }} + </a> + </nav> +</template> + +<script lang="ts"> +import { Vue, Component } from 'vue-property-decorator'; + +@Component +export default class UiCarousel extends Vue { + + get label(): string { + if (this.$route.name) { + const routeName = this.$route.name.split('-')[0]; + let featureLabel = ''; + switch(routeName) { + case 'login': + featureLabel = '��'; + break; + case 'recommendConsultant': + featureLabel = '������'; + break; + case 'quickFilter': + featureLabel = '敹恍�祟�'; + break; + case 'myConsultantList': + featureLabel = '���“���'; + break; + case 'agentInfo': + featureLabel = '璆剖�鞈��' + break; + default: + featureLabel = '�����'; + break; + } + return featureLabel; + } else { + return '�����'; + } + } + +} +</script> + +<style lang="scss" scoped> +.pam-back-action-bar { + height: 53px; + border: 1px solid #CCCCCC; + display: flex; + align-items: center; + i { + font-size: 20px; + padding-right: 14px; + } + a { + cursor: pointer; + font-size: 24px; + font-weight: bold; + padding: 20px; + } +} +</style> -- Gitblit v1.8.0