From 6e64ed2a204dc2679579d118602067382e6ebec6 Mon Sep 17 00:00:00 2001 From: Jack <jack.su@pollex.com.tw> Date: 星期二, 23 十一月 2021 18:35:35 +0800 Subject: [PATCH] Merge branch 'master' of ssh://192.168.0.10:29418/pcalife/PAM --- PAMapp/components/NavBar.vue | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/PAMapp/components/NavBar.vue b/PAMapp/components/NavBar.vue index 85e5ac2..20578a1 100644 --- a/PAMapp/components/NavBar.vue +++ b/PAMapp/components/NavBar.vue @@ -34,13 +34,15 @@ <script lang="ts"> import { Vue, Component } from 'vue-property-decorator'; import { namespace } from 'nuxt-property-decorator'; + import { Role } from '~/assets/ts/models/enum/Role'; import * as _ from 'lodash'; - const localStorage = namespace('localStorage'); + + const roleStorage = namespace('localStorage'); @Component export default class NavBar extends Vue { - @localStorage.Mutation storageClear!: () => void; - @localStorage.Getter idToken!: string | null; - @localStorage.Getter currentRole!: string | null; + @roleStorage.Mutation storageClear!: () => void; + @roleStorage.Getter idToken!: string | null; + @roleStorage.Getter currentRole!: string | null; navBarList = [{ authorityOfRoleList: [Role.NOT_LOGIN], @@ -99,11 +101,6 @@ this.storageClear(); _.isEqual(this.$route.name, 'index') ? location.reload() : this.$router.push('/'); } - } - export enum Role { - USER = 'user', - ADMIN = 'admin', - NOT_LOGIN = '', } </script> -- Gitblit v1.8.0