2025-06-16 14:42:26 +08:00
|
|
|
<template>
|
2025-08-15 14:32:40 +08:00
|
|
|
<div class="navbar-wrap px-24px">
|
2025-08-29 15:49:50 +08:00
|
|
|
<div class="w-full h-full relative flex justify-between">
|
2025-09-11 11:26:51 +08:00
|
|
|
<div class="left-wrap flex items-center cursor-pointer" @click="onLogoClick">
|
2025-09-11 12:04:54 +08:00
|
|
|
<img src="@/assets/img/icon-logo.png" alt="" width="96" height="24" />
|
2025-09-11 11:26:51 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- <div class="flex-1"> -->
|
2025-09-11 12:04:54 +08:00
|
|
|
<MiddleSide v-if="!isHomeRoute" />
|
2025-09-11 11:26:51 +08:00
|
|
|
<!-- </div> -->
|
2025-09-11 12:04:54 +08:00
|
|
|
<RightSide :isAgentRoute="isAgentRoute" v-if="userStore.isLogin" />
|
2025-06-16 14:42:26 +08:00
|
|
|
</div>
|
2025-08-29 15:49:50 +08:00
|
|
|
</div>
|
2025-06-16 14:42:26 +08:00
|
|
|
</template>
|
|
|
|
|
|
2025-07-10 15:05:02 +08:00
|
|
|
<script setup>
|
2025-08-15 14:32:40 +08:00
|
|
|
import MiddleSide from './components/middle-side';
|
2025-07-10 15:05:02 +08:00
|
|
|
import RightSide from './components/right-side';
|
|
|
|
|
|
2025-08-13 10:46:10 +08:00
|
|
|
import { useUserStore } from '@/stores';
|
2025-09-11 12:04:54 +08:00
|
|
|
import { useEnterpriseStore } from '@/stores/modules/enterprise';
|
2025-08-11 12:04:03 +08:00
|
|
|
import { handleUserHome } from '@/utils/user.ts';
|
2025-07-10 15:05:02 +08:00
|
|
|
import router from '@/router';
|
2025-08-13 10:46:10 +08:00
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const userStore = useUserStore();
|
2025-09-11 12:04:54 +08:00
|
|
|
const enterpriseStore = useEnterpriseStore();
|
2025-08-13 10:46:10 +08:00
|
|
|
|
2025-09-11 12:04:54 +08:00
|
|
|
const hasOpenEnterprise = computed(() => enterpriseStore.isOpenEnterprise);
|
2025-08-13 10:46:10 +08:00
|
|
|
const isAgentRoute = computed(() => {
|
|
|
|
|
return route.meta?.isAgentRoute;
|
|
|
|
|
});
|
2025-08-19 18:01:30 +08:00
|
|
|
|
|
|
|
|
const isHomeRoute = computed(() => {
|
|
|
|
|
return route.name === 'Home';
|
|
|
|
|
});
|
2025-09-11 11:26:51 +08:00
|
|
|
|
|
|
|
|
const onLogoClick = () => {
|
|
|
|
|
if (hasOpenEnterprise.value) {
|
|
|
|
|
handleUserHome();
|
|
|
|
|
} else {
|
|
|
|
|
router.push({
|
2025-09-11 12:04:54 +08:00
|
|
|
name: 'Trial',
|
|
|
|
|
});
|
2025-09-11 11:26:51 +08:00
|
|
|
}
|
|
|
|
|
};
|
2025-07-10 15:05:02 +08:00
|
|
|
</script>
|
2025-07-01 16:00:35 +08:00
|
|
|
<style scoped lang="scss">
|
2025-07-10 15:05:02 +08:00
|
|
|
.navbar-wrap {
|
2025-08-15 14:32:40 +08:00
|
|
|
position: relative;
|
2025-06-16 14:42:26 +08:00
|
|
|
height: 100%;
|
2025-09-01 17:00:40 +08:00
|
|
|
// &::before {
|
|
|
|
|
// width: 100%;
|
|
|
|
|
// height: 100%;
|
|
|
|
|
// background: url('@/assets/img/icon-app-header-bg.png') center top no-repeat !important;
|
|
|
|
|
// background-size: cover !important;
|
|
|
|
|
// bottom: 0;
|
|
|
|
|
// content: '';
|
|
|
|
|
// display: block;
|
|
|
|
|
// left: 0;
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// right: 0;
|
|
|
|
|
// top: 0;
|
|
|
|
|
// z-index: -998;
|
|
|
|
|
// }
|
2025-08-15 14:32:40 +08:00
|
|
|
|
|
|
|
|
// background-color: var(--color-bg-2);
|
|
|
|
|
// border-bottom: 1px solid var(--color-border);
|
2025-07-10 15:05:02 +08:00
|
|
|
.left-wrap {
|
2025-06-16 14:42:26 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2025-07-01 17:52:41 +08:00
|
|
|
}
|
2025-09-11 11:26:51 +08:00
|
|
|
|
2025-07-16 18:29:05 +08:00
|
|
|
.arco-dropdown-option-suffix {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2025-09-11 11:26:51 +08:00
|
|
|
|
2025-07-16 18:29:05 +08:00
|
|
|
.enterprises-doption {
|
|
|
|
|
.arco-dropdown-option-content {
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
2025-09-11 11:26:51 +08:00
|
|
|
|
2025-07-16 18:29:05 +08:00
|
|
|
&:not(.arco-dropdown-option-disabled):hover {
|
|
|
|
|
background-color: transparent;
|
2025-09-11 11:26:51 +08:00
|
|
|
|
2025-07-16 18:29:05 +08:00
|
|
|
.arco-dropdown-option-content {
|
|
|
|
|
background: var(--BG-200, #f2f3f5);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-07-01 17:52:41 +08:00
|
|
|
}
|
2025-07-01 16:00:35 +08:00
|
|
|
</style>
|