feat: 灵机空间不显示header菜单
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="right-wrap">
|
||||
<!-- 灵机空间入口 -->
|
||||
<div class="agent-entry" :class="isAgentRoute ? 'agent' : ''" @click="handleAgentClick"></div>
|
||||
|
||||
<!-- 任务中心 -->
|
||||
<div class="relative mx-16px" @click="setUnread">
|
||||
<SvgIcon
|
||||
name="svg-taskCenter"
|
||||
@ -11,6 +14,7 @@
|
||||
<div class="w-4px h-4px rounded-50% bg-#F64B31 absolute top-1px right-1px" v-if="hasUnreadInfo"></div>
|
||||
</div>
|
||||
|
||||
<!-- 头像设置 -->
|
||||
<a-dropdown trigger="click" class="layout-avatar-dropdown">
|
||||
<a-avatar class="cursor-pointer" :size="32">
|
||||
<img alt="avatar" src="@/assets/avatar.svg" />
|
||||
@ -84,15 +88,19 @@ import icon1 from '@/assets/option.svg';
|
||||
import icon2 from '@/assets/exit.svg';
|
||||
import icon3 from '@/assets/change.svg';
|
||||
|
||||
const props = defineProps({
|
||||
isAgentRoute: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const enterpriseStore = useEnterpriseStore();
|
||||
const userStore = useUserStore();
|
||||
const sideBarStore = useSidebarStore();
|
||||
const route = useRoute();
|
||||
|
||||
const hasUnreadInfo = computed(() => sideBarStore.unreadInfo.length);
|
||||
const isAgentRoute = computed(() => {
|
||||
return route.meta?.isAgentRoute;
|
||||
});
|
||||
|
||||
const exitAccountModalRef = ref(null);
|
||||
const downloadCenterModalRef = ref(null);
|
||||
@ -123,7 +131,7 @@ const setUnread = () => {
|
||||
}
|
||||
};
|
||||
const handleAgentClick = () => {
|
||||
router.push({ name: isAgentRoute.value ? 'Home' : 'AgentIndex' });
|
||||
router.push({ name: props.isAgentRoute ? 'Home' : 'AgentIndex' });
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<NavbarMenu />
|
||||
<NavbarMenu v-if="!isAgentRoute"/>
|
||||
</div>
|
||||
<RightSide />
|
||||
<RightSide :isAgentRoute="isAgentRoute" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -17,6 +17,12 @@ import NavbarMenu from './components/navbar-menu';
|
||||
import RightSide from './components/right-side';
|
||||
|
||||
import router from '@/router';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const isAgentRoute = computed(() => {
|
||||
return route.meta?.isAgentRoute;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.navbar-wrap {
|
||||
|
||||
Reference in New Issue
Block a user