chore: 租户选中状态 不显示个人中心

This commit is contained in:
dap 2024-09-02 15:37:32 +08:00
parent 6d19560863
commit 17aa044da7

View File

@ -21,48 +21,59 @@ import TenantToggle from '#/components/TenantToggle/index.vue';
import { $t } from '#/locales'; import { $t } from '#/locales';
import { resetRoutes } from '#/router'; import { resetRoutes } from '#/router';
import { useAuthStore, useNotifyStore } from '#/store'; import { useAuthStore, useNotifyStore } from '#/store';
import { useTenantStore } from '#/store/tenant';
const userStore = useUserStore(); const userStore = useUserStore();
const authStore = useAuthStore(); const authStore = useAuthStore();
const accessStore = useAccessStore(); const accessStore = useAccessStore();
const router = useRouter(); const router = useRouter();
const menus = computed(() => [ const tenantStore = useTenantStore();
{ const menus = computed(() => {
handler: () => { const defaultMenus = [
openWindow(VBEN_DOC_URL, { {
target: '_blank', handler: () => {
}); openWindow(VBEN_DOC_URL, {
target: '_blank',
});
},
icon: BookOpenText,
text: $t('widgets.document'),
}, },
icon: BookOpenText, {
text: $t('widgets.document'), handler: () => {
}, router.push('/profile');
{ },
handler: () => { icon: ProfileIcon,
router.push('/profile'); text: $t('widgets.profile'),
}, },
icon: ProfileIcon, {
text: $t('widgets.profile'), handler: () => {
}, openWindow(VBEN_GITHUB_URL, {
{ target: '_blank',
handler: () => { });
openWindow(VBEN_GITHUB_URL, { },
target: '_blank', icon: MdiGithub,
}); text: 'GitHub',
}, },
icon: MdiGithub, {
text: 'GitHub', handler: () => {
}, openWindow(`${VBEN_GITHUB_URL}/issues`, {
{ target: '_blank',
handler: () => { });
openWindow(`${VBEN_GITHUB_URL}/issues`, { },
target: '_blank', icon: CircleHelp,
}); text: $t('widgets.qa'),
}, },
icon: CircleHelp, ];
text: $t('widgets.qa'), /**
}, * 租户选中状态 不显示个人中心
]); */
if (tenantStore.checked) {
defaultMenus.splice(1, 1);
}
return defaultMenus;
});
const { loginLoading } = storeToRefs(authStore); const { loginLoading } = storeToRefs(authStore);