feat: 添加入口
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="right-wrap">
|
||||
<div class="relative mr-12px" @click="setUnread">
|
||||
<div class="agent-entry" :class="isAgentRoute ? 'agent' : ''" @click="handleAgentClick"></div>
|
||||
<div class="relative mx-16px" @click="setUnread">
|
||||
<SvgIcon
|
||||
name="svg-taskCenter"
|
||||
size="16"
|
||||
@ -86,8 +87,12 @@ import icon3 from '@/assets/change.svg';
|
||||
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);
|
||||
@ -117,15 +122,13 @@ const setUnread = () => {
|
||||
sideBarStore.removeTaskUnreadInfo();
|
||||
}
|
||||
};
|
||||
const handleAgentClick = () => {
|
||||
router.push({ name: isAgentRoute.value ? 'Home' : 'AgentIndex' });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.right-wrap {
|
||||
display: flex;
|
||||
padding-right: 20px;
|
||||
list-style: none;
|
||||
align-items: center;
|
||||
}
|
||||
@import './style.scss';
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.layout-avatar-dropdown,
|
||||
|
||||
27
src/components/_base/navbar/components/right-side/style.scss
Normal file
27
src/components/_base/navbar/components/right-side/style.scss
Normal file
@ -0,0 +1,27 @@
|
||||
.right-wrap {
|
||||
display: flex;
|
||||
padding-right: 20px;
|
||||
list-style: none;
|
||||
align-items: center;
|
||||
.agent-entry {
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
background: url('@/assets/img/agent/icon-entry.png') 100% 100%;
|
||||
background-size: cover;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: url('@/assets/img/agent/icon-entry-hover.png') 100% 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
&.agent {
|
||||
background: url('@/assets/img/agent/icon-home.png') 100% 100%;
|
||||
background-size: cover;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: url('@/assets/img/agent/icon-home-hover.png') 100% 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user