| | |
| | | <template> |
| | | <nav class="pam-back-action-bar fix-chrome-click--issue"> |
| | | <a @click="$router.push('/')"> |
| | | <a @click="pushRouterByLoginRole"> |
| | | <i class="icon-left "></i>{{ label }} |
| | | </a> |
| | | </nav> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | |
| | | import { namespace } from 'nuxt-property-decorator'; |
| | | import { Vue, Component,} from 'vue-property-decorator'; |
| | | import * as _ from 'lodash'; |
| | | import { Role } from './NavBar.vue'; |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class UiCarousel extends Vue { |
| | | |
| | | @localStorage.Getter currentRole!:string; |
| | | get label(): string { |
| | | if (this.$route.name) { |
| | | const routeName = this.$route.name.split('-')[0]; |
| | |
| | | return '回首頁'; |
| | | } |
| | | } |
| | | |
| | | pushRouterByLoginRole():void{ |
| | | const link = _.isEqual(this.currentRole,Role.ADMIN)? '/myAppointmentList/appointmentList':'/'; |
| | | this.$router.push(link); |
| | | } |
| | | } |
| | | </script> |
| | | |