切换登录账号,左侧菜单按权限显示问题
This commit is contained in:
@@ -178,7 +178,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
/** Init auth route */
|
/** Init auth route */
|
||||||
async function initAuthRoute() {
|
async function initAuthRoute() {
|
||||||
// check if user info is initialized
|
// check if user info is initialized
|
||||||
if (!authStore.userInfo.userId) {
|
if (!authStore.userInfo.user_id) {
|
||||||
await authStore.initUserInfo();
|
await authStore.initUserInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,6 +370,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function onRouteSwitchWhenLoggedIn() {
|
async function onRouteSwitchWhenLoggedIn() {
|
||||||
|
initAuthRoute();
|
||||||
// some global init logic when logged in and switch route
|
// some global init logic when logged in and switch route
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ onMounted(() => {
|
|||||||
<NSpin :show="fileLoading" size="small">
|
<NSpin :show="fileLoading" size="small">
|
||||||
<div class="mb-1.5 text-xs text-slate-400">全文检索「{{ keyword }}」:跨全部文件夹命中 {{ queryList.length }} 份</div>
|
<div class="mb-1.5 text-xs text-slate-400">全文检索「{{ keyword }}」:跨全部文件夹命中 {{ queryList.length }} 份</div>
|
||||||
<div class="top-scroll">
|
<div class="top-scroll">
|
||||||
<div class="divide-y rounded-md border bg-white">
|
<div class="divide-y rounded-md border bg-white h-100%">
|
||||||
<div v-for="d in queryList" :key="d.name" class="flex flex-wrap items-center gap-3 px-2 py-2.5">
|
<div v-for="d in queryList" :key="d.name" class="flex flex-wrap items-center gap-3 px-2 py-2.5">
|
||||||
<Icon icon="akar-icons:file" class="size-16px" />
|
<Icon icon="akar-icons:file" class="size-16px" />
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
@@ -521,7 +521,9 @@ onMounted(() => {
|
|||||||
<NButton type="primary" text class="hover:underline text-xs" @click="download(d)">下载</NButton>
|
<NButton type="primary" text class="hover:underline text-xs" @click="download(d)">下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="queryList.length === 0" class="py-6 text-center text-xs text-slate-400">未匹配到相关资料</div>
|
<div v-if="queryList.length === 0" class="h-100% flex items-center justify-center">
|
||||||
|
<NEmpty description="未匹配到相关资料" class="text-xs"></NEmpty>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</NSpin>
|
</NSpin>
|
||||||
|
|||||||
@@ -168,7 +168,9 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<p class="text-xs text-slate-400 text-center">暂无数据</p>
|
<div class="h-100% flex items-center justify-center py-3">
|
||||||
|
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</NCard>
|
</NCard>
|
||||||
|
|||||||
Reference in New Issue
Block a user