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