Merge pull request #8127 from dataease/pr@dev-v2_dzz_mobile

fix(工作台): 点击 logo 返回工作台
This commit is contained in:
dataeaseShu 2024-02-22 14:55:08 +08:00 committed by GitHub
commit febf4715ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"