Skip to content

Commit

Permalink
fix(projects): fix tabs data when role is change
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jun 6, 2024
1 parent 03c8075 commit 9fd89aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/function/toggle-auth/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useLoading } from '@sa/hooks';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import { useAuthStore } from '@/store/modules/auth';
import { useTabStore } from '@/store/modules/tab';
import { useAuth } from '@/hooks/business/auth';
const route = useRoute();
const appStore = useAppStore();
const authStore = useAuthStore();
const tabStore = useTabStore();
const { hasAuth } = useAuth();
const { loading, startLoading, endLoading } = useLoading();
Expand Down Expand Up @@ -48,6 +52,7 @@ async function handleToggleAccount(account: Account) {
startLoading();
await authStore.login(account.userName, account.password, false);
tabStore.initTabStore(route);
endLoading();
appStore.reloadPage();
}
Expand Down

0 comments on commit 9fd89aa

Please sign in to comment.