|
@@ -13,8 +13,15 @@
|
|
|
<span>{{ item.name }}</span>
|
|
<span>{{ item.name }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</nav>
|
|
</nav>
|
|
|
- <div class="platform__login">
|
|
|
|
|
- <div class="platform__login__button" @click="showLogin = true">
|
|
|
|
|
|
|
+ <div class="platform__right">
|
|
|
|
|
+ <div class="platform__right__search">
|
|
|
|
|
+ <el-input v-model="searchValue" placeholder="搜索您想了解的" class="input-with-icon" clearable>
|
|
|
|
|
+ <template #prepend>
|
|
|
|
|
+ <img :src="searchIcon" alt="search" class="search-icon" @click="handleSearch"/>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="platform__right__login" @click="showLogin = true">
|
|
|
<span>登录</span>
|
|
<span>登录</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -27,9 +34,16 @@
|
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
import { NAV_LIST } from '@/constant/nav';
|
|
import { NAV_LIST } from '@/constant/nav';
|
|
|
import logo from 'assets/images/home/comac-logo@1X.png';
|
|
import logo from 'assets/images/home/comac-logo@1X.png';
|
|
|
|
|
+ import searchIcon from 'assets/svg/search.svg';
|
|
|
|
|
+ import Login from '@/components/Login.vue';
|
|
|
const activeNav = ref(NAV_LIST[0].name);
|
|
const activeNav = ref(NAV_LIST[0].name);
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const showLogin = ref(false);
|
|
const showLogin = ref(false);
|
|
|
|
|
+ const searchValue = ref('');
|
|
|
|
|
+
|
|
|
|
|
+ const handleSearch = () => {
|
|
|
|
|
+ console.log('searchValue', searchValue.value);
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const handleNavClick = (item: { name: string; path: string }) => {
|
|
const handleNavClick = (item: { name: string; path: string }) => {
|
|
|
activeNav.value = item.name;
|
|
activeNav.value = item.name;
|
|
@@ -41,13 +55,14 @@
|
|
|
.header {
|
|
.header {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ position: relative;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 78cpx;
|
|
height: 78cpx;
|
|
|
background: url('assets/images/home/nav-bg@1X.png') no-repeat center center / cover;
|
|
background: url('assets/images/home/nav-bg@1X.png') no-repeat center center / cover;
|
|
|
&__nav {
|
|
&__nav {
|
|
|
@include flex-center;
|
|
@include flex-center;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- margin-left: 11cpx;
|
|
|
|
|
|
|
+ margin-left: 32cpx;
|
|
|
&--item {
|
|
&--item {
|
|
|
@include flex-center;
|
|
@include flex-center;
|
|
|
height: 45cpx;
|
|
height: 45cpx;
|
|
@@ -74,16 +89,43 @@
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
margin-left: 9cpx;
|
|
margin-left: 9cpx;
|
|
|
}
|
|
}
|
|
|
- .platform__login {
|
|
|
|
|
- width: 129cpx;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- background: $primary-color;
|
|
|
|
|
- margin-left: auto;
|
|
|
|
|
- &__button {
|
|
|
|
|
|
|
+ .platform__right {
|
|
|
|
|
+ @include flex-center;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ height: 73cpx;
|
|
|
|
|
+ &__search {
|
|
|
@include flex-center;
|
|
@include flex-center;
|
|
|
|
|
+ width: 210cpx;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ padding: 28cpx 26cpx;
|
|
|
|
|
+ background: rgba($white-color, 0.4);
|
|
|
|
|
+ }
|
|
|
|
|
+ &__login {
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
|
+ padding: 27cpx 40cpx 26cpx 40cpx;
|
|
|
font-size: 18cpx;
|
|
font-size: 18cpx;
|
|
|
- color: $white-color;
|
|
|
|
|
|
|
+ color: $primary-color;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .input-with-icon {
|
|
|
|
|
+ :deep(.el-input__wrapper),
|
|
|
|
|
+ :deep(.el-input-group__prepend) {
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+ box-shadow: none;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(.el-input__inner) {
|
|
|
|
|
+ width: 120cpx;
|
|
|
|
|
+ margin-left: 5cpx;
|
|
|
|
|
+ font-size: 16cpx;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+ }
|
|
|
|
|
+ .search-icon {
|
|
|
|
|
+ width: 28cpx;
|
|
|
|
|
+ height: 28cpx;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|