fix(工作台): 点击 logo 返回工作台

This commit is contained in:
dataeaseShu 2024-02-22 14:54:13 +08:00
parent 9ca7211530
commit cf610c06fe

View File

@ -16,6 +16,11 @@ import { XpackComponent } from '@/components/plugin'
const { push } = useRouter()
const route = useRoute()
const handleIconClick = () => {
if (route.path === '/workbranch/index') return
push('/workbranch/index')
}
const desktop = isDesktop()
const activeIndex = computed(() => {
if (route.path.includes('system')) {
@ -50,7 +55,7 @@ onMounted(() => {
<template>
<el-header class="header-flex">
<Icon className="logo" name="logo"></Icon>
<Icon @click="handleIconClick" className="logo" name="logo"></Icon>
<el-menu
:default-active="activeIndex"
class="el-menu-demo"