Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
liyeyun
Commits
bca7e23a
Commit
bca7e23a
authored
Dec 16, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页菜单样式修改
parent
b5a4e9d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
20 deletions
+37
-20
CommonHeader.vue
src/components/common/CommonHeader.vue
+37
-20
No files found.
src/components/common/CommonHeader.vue
View file @
bca7e23a
...
...
@@ -4,7 +4,7 @@
<!--
<div>
logo
</div>
-->
<div
class=
"flex flex-1 justify-start"
>
<div
v-if=
"route.name === 'home'"
class=
"mr-7 flex w-[224px] items-center"
>
<img
class=
"
w-[123px] h-[3
3px]"
src=
"@/assets/images/nav-logo.png"
alt=
""
/>
<img
class=
"
h-[33px] w-[12
3px]"
src=
"@/assets/images/nav-logo.png"
alt=
""
/>
<div
class=
"city-space ml-4 flex items-center"
@
mouseenter=
"changeCityStatus(1)"
...
...
@@ -21,6 +21,7 @@
</div>
<ElMenu
class=
"!border-none"
:class=
"
{ 'no-select': route.name === 'home' }"
mode="horizontal"
:default-active="currentPath"
:ellipsis="false"
...
...
@@ -49,7 +50,10 @@
</template>
</ElMenu>
</div>
<div
class=
"flex items-center pr-[56px] text-base text-[#333333]"
:style=
"{color: route.name === 'home'? 'white': '#333' }"
>
<div
class=
"flex items-center pr-[56px] text-base text-[#333333]"
:style=
"{ color: route.name === 'home' ? 'white' : '#333' }"
>
<div>
<div
v-if=
"userInfo"
class=
"flex items-center"
>
<ElDropdown
...
...
@@ -95,8 +99,15 @@
<span
@
click=
"handleLogin('register')"
>
注册
</span>
</div>
</div>
<div
class=
"ml-4 flex items-center text-base font-medium text-[#C0322B]"
:style=
"{color: route.name === 'home'? 'white': '#C0322B' }"
>
<img
v-if=
"route.name === 'home'"
class=
"mr-2 h-4 w-4"
src=
"@/assets/images/icon-phone_white.png"
/>
<div
class=
"ml-4 flex items-center text-base font-medium text-[#C0322B]"
:style=
"{ color: route.name === 'home' ? 'white' : '#C0322B' }"
>
<img
v-if=
"route.name === 'home'"
class=
"mr-2 h-4 w-4"
src=
"@/assets/images/icon-phone_white.png"
/>
<img
v-else
class=
"mr-2 h-4 w-4"
src=
"@/assets/images/icon-phone_call.png"
/>
<span>
400-833-0813
</span>
</div>
...
...
@@ -112,7 +123,7 @@
<div
v-for=
"cities in cityList"
:key=
"cities.label"
class=
"
text-[#1a1a1a] mr-[41px] shrink-0 text-base
"
class=
"
mr-[41px] shrink-0 text-base text-[#1a1a1a]
"
>
<span
class=
"font-medium"
>
{{ cities.label }}
</span>
<p
...
...
@@ -301,6 +312,10 @@ const handleMenuChange = (menu: HeaderMenuItem) => {
cityInFilter
.
value
&&
menuRoute
.
name
!==
RouteName
.
home
?
JSON
.
stringify
({
provinceName
:
cityInFilter
.
value
.
name
})
:
undefined
;
const
isNewPage
=
menuRoute
.
name
===
RouteName
.
industryCategory
;
if
(
isNewPage
)
{
console
.
log
(
isNewPage
);
}
openPage
(
{
path
:
menu
.
path
,
...
...
@@ -308,17 +323,16 @@ const handleMenuChange = (menu: HeaderMenuItem) => {
searchParams
,
},
},
menuRoute
.
name
===
RouteName
.
industryCategory
,
isNewPage
,
);
};
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.header-view
{
box-shadow
:
0
2px
8px
0
rgba
(
90
,
0
,
0
,
0
.1
);
position
:
relative
;
min-width
:
1200px
;
z-index
:
100
;
::v-deep
{
.el-menu-item
{
padding
:
0
16px
;
}
...
...
@@ -326,20 +340,26 @@ const handleMenuChange = (menu: HeaderMenuItem) => {
color
:
#333333
;
// font-weight: 600;
font-size
:
16px
;
border
:
none
;
&
:hover
{
background-color
:
#fff
;
color
:
#c0322b
;
}
}
.el-menu--horizontal
.el-menu-item
:not
(
.is-disabled
)
:focus
{
background
:
#fff
;
}
.el-menu--horizontal
>
.el-menu-item.is-active
{
&
.is-active
{
border-bottom-color
:
#fff
;
color
:
#c0322b
!
important
;
&
:hover
{
color
:
#c0322b
;
}
.el-menu--horizontal
>
.el-menu-item.is-active
:hover
{
color
:
#c0322b
!
important
;
}
}
.no-select.el-menu--horizontal
{
.el-menu-item.is-active
{
color
:
white
!
important
;
background
:
transparent
!
important
;
}
&
>
.el-menu-item
:hover
{
color
:
white
!
important
;
}
}
}
...
...
@@ -363,11 +383,7 @@ const handleMenuChange = (menu: HeaderMenuItem) => {
.city-item
:hover
{
color
:
#c0322b
;
}
}
.city-active
{
color
:
#c0322b
;
}
::v-deep
.el-dropdown__popper.el-popper.user-menu
{
::v-deep
.el-dropdown__popper.el-popper.user-menu
{
top
:
43px
!
important
;
border
:
none
;
border-radius
:
0
;
...
...
@@ -384,6 +400,7 @@ const handleMenuChange = (menu: HeaderMenuItem) => {
.el-popper__arrow
{
display
:
none
;
}
}
}
.home-page_header
{
background-color
:
transparent
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment