This commit is contained in:
张成
2025-10-09 18:39:14 +08:00
parent 26ef31886b
commit bf0d15f4aa
2 changed files with 3 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<Sider hide-trigger collapsible :width="256" :collapsed-width="64" v-model="collapsed" class="left-sider" :style="{overflow: 'hidden'}">
<div class="sidebar-brand" @click="goHome" v-if="!collapsed">
<img style="width:50px" :src="sysFormModel.logoUrl" />
<img style="width:30px" :src="sysFormModel.logoUrl" />
<span class="ml10">{{sysFormModel.title}}</span>
</div>

View File

@@ -58,7 +58,8 @@ export default {
// 跳转到首页
// 使用 replace 避免返回时回到登录页
setTimeout(() => {
this.$router.replace({ path: '/home' }).catch(() => {
// 跳转到根路径,会自动 redirect 到第一个菜单
this.$router.replace({ path: '/' }).catch(() => {
// 如果路由跳转失败,刷新页面
window.location.href = window.location.origin + window.location.pathname + '#/'
})