forked from github/dataease
fix(工作台): 点击 logo 返回工作台
This commit is contained in:
parent
9ca7211530
commit
cf610c06fe
@ -16,6 +16,11 @@ import { XpackComponent } from '@/components/plugin'
|
|||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
const handleIconClick = () => {
|
||||||
|
if (route.path === '/workbranch/index') return
|
||||||
|
push('/workbranch/index')
|
||||||
|
}
|
||||||
|
|
||||||
const desktop = isDesktop()
|
const desktop = isDesktop()
|
||||||
const activeIndex = computed(() => {
|
const activeIndex = computed(() => {
|
||||||
if (route.path.includes('system')) {
|
if (route.path.includes('system')) {
|
||||||
@ -50,7 +55,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-header class="header-flex">
|
<el-header class="header-flex">
|
||||||
<Icon className="logo" name="logo"></Icon>
|
<Icon @click="handleIconClick" className="logo" name="logo"></Icon>
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeIndex"
|
:default-active="activeIndex"
|
||||||
class="el-menu-demo"
|
class="el-menu-demo"
|
||||||
|
Loading…
Reference in New Issue
Block a user