From e430eadebde1690a177cdf79e8a35da66c484dd0 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 28 十二月 2021 11:38:38 +0800 Subject: [PATCH] refactor components: NavBar, Footer, loading, popUpFrame --- PAMapp/components/NavBar.vue | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/PAMapp/components/NavBar.vue b/PAMapp/components/NavBar.vue index b59834f..44664b0 100644 --- a/PAMapp/components/NavBar.vue +++ b/PAMapp/components/NavBar.vue @@ -40,11 +40,15 @@ const roleStorage = namespace('localStorage'); @Component export default class NavBar extends Vue { - @roleStorage.Mutation storageClear!: () => void; @roleStorage.Getter idToken!: string | null; @roleStorage.Getter currentRole!: string | null; @roleStorage.Getter consultantId!: string | null; + + @roleStorage.Mutation storageClear!: () => void; + + isOpenDropdown = false; + login_role = Role.NOT_LOGIN; navBarList = [{ authorityOfRoleList: [Role.NOT_LOGIN], @@ -92,12 +96,8 @@ title: '憿批��', }, ]; - login_role = Role.NOT_LOGIN; - isOpenDropdown = false; - get loginRole(): Role { - return this.idToken && this.currentRole ? (this.currentRole as Role): Role.NOT_LOGIN; - } + ////////////////////////////////////////////////////////////////////// routerNavigateTo(url: string): void { (this.$refs.dropdown as any).hide(); @@ -115,6 +115,11 @@ this.storageClear(); _.isEqual(this.$route.name, 'index') ? location.reload() : this.$router.push('/'); } + + get loginRole(): Role { + return this.idToken && this.currentRole ? (this.currentRole as Role): Role.NOT_LOGIN; + } + } </script> -- Gitblit v1.8.0