1
0
forked from dyf/dyf-vue-ui

更新代码1

This commit is contained in:
微微一笑
2025-07-10 17:31:00 +08:00
parent 3df4bc3c9b
commit a01f66dcc4

View File

@ -20,7 +20,7 @@
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<!-- <img :src="userStore.avatar" class="user-avatar" /> --> <!-- <img :src="userStore.avatar" class="user-avatar" /> -->
<img src="@/assets/images/avatar.png" class="user-avatar" /> <img src="@/assets/images/avatar.png" class="user-avatar" />
<div style="margin-left: 10px;">{{ useUserStore().roles[0] }}</div> <div style="margin-left: 10px;">{{ useUserStore().nickname }}</div>
<el-icon><caret-bottom /></el-icon> <el-icon><caret-bottom /></el-icon>
</div> </div>
<template #dropdown> <template #dropdown>
@ -61,7 +61,7 @@ const newNotice = ref(<number>0);
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const userId = ref(userStore.userId); const userId = ref(userStore.userId);
console.log(useUserStore().roles[0], 'userStoreuserStoreuserStore'); // console.log(useUserStore(), 'userStoreuserStoreuserStore');
const companyName = ref(undefined); const companyName = ref(undefined);
@ -82,7 +82,7 @@ const dynamicTenantEvent = async (tenantId: string) => {
if (companyName.value != null && companyName.value !== '') { if (companyName.value != null && companyName.value !== '') {
await dynamicTenant(tenantId); await dynamicTenant(tenantId);
dynamic.value = true; dynamic.value = true;
await proxy?.$router.push('/'); await router.push('/');
await proxy?.$tab.closeAllPage(); await proxy?.$tab.closeAllPage();
await proxy?.$tab.refreshPage(); await proxy?.$tab.refreshPage();
} }
@ -91,7 +91,7 @@ const dynamicTenantEvent = async (tenantId: string) => {
const dynamicClearEvent = async () => { const dynamicClearEvent = async () => {
await dynamicClear(); await dynamicClear();
dynamic.value = false; dynamic.value = false;
await proxy?.$router.push('/'); await router.push('/');
await proxy?.$tab.closeAllPage(); await proxy?.$tab.closeAllPage();
await proxy?.$tab.refreshPage(); await proxy?.$tab.refreshPage();
}; };