Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
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
吴迪
gs1
Commits
c849cf12
Commit
c849cf12
authored
Nov 21, 2021
by
Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: nav部分样式修改
parent
be679517
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
37 deletions
+52
-37
HeaderDropdown.vue
src/components/layout/header/HeaderDropdown.vue
+4
-4
index.vue
src/components/layout/header/index.vue
+47
-32
mock.js
src/components/layout/header/mock.js
+1
-1
No files found.
src/components/layout/header/HeaderDropdown.vue
View file @
c849cf12
...
@@ -85,7 +85,7 @@ export default {
...
@@ -85,7 +85,7 @@ export default {
<
span
vOn
:
click
=
{()
=>
{
<
span
vOn
:
click
=
{()
=>
{
this
.
$emit
(
'itemClick'
,
{...
item
,
root
:
{...
this
.
nav
}})
this
.
$emit
(
'itemClick'
,
{...
item
,
root
:
{...
this
.
nav
}})
}}
}}
class
=
"pointer gs-hover"
class
=
"pointer
link-item
gs-hover"
>
{
item
.
name
}
>
{
item
.
name
}
<
/span
>
<
/span
>
<
/div>
)
<
/div>
)
...
@@ -114,7 +114,7 @@ export default {
...
@@ -114,7 +114,7 @@ export default {
//
导航
item
下拉
//
导航
item
下拉
.dropdown-menu.gs-nav-dropdown
{
.dropdown-menu.gs-nav-dropdown
{
border
:
none
;
border
:
none
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
box-shadow
:
0px
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
box-shadow
:
0px
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
border-radius
:
0px
0px
6px
6px
;
border-radius
:
0px
0px
6px
6px
;
padding
:
20px
40px
;
padding
:
20px
40px
;
...
@@ -122,7 +122,7 @@ export default {
...
@@ -122,7 +122,7 @@ export default {
.title
{
.title
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#04408
D
;
color
:
#04408
d
;
line-height
:
25px
;
line-height
:
25px
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
margin-bottom
:
29px
;
margin-bottom
:
29px
;
...
@@ -143,7 +143,7 @@ export default {
...
@@ -143,7 +143,7 @@ export default {
.rect-title
{
.rect-title
{
font-weight
:
500
;
font-weight
:
500
;
color
:
#04408
D
;
color
:
#04408
d
;
line-height
:
22px
;
line-height
:
22px
;
font-size
:
16px
;
font-size
:
16px
;
padding-bottom
:
13px
;
padding-bottom
:
13px
;
...
...
src/components/layout/header/index.vue
View file @
c849cf12
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
<!-- Default Logo -->
<!-- Default Logo -->
<a
class=
"navbar-brand"
href=
"/Home"
aria-label=
"Front"
>
<a
class=
"navbar-brand"
href=
"/Home"
aria-label=
"Front"
>
<img
<img
class=
"navbar-brand-logo"
class=
"navbar-brand-logo"
src=
"../../../assets/image/head/logo.png"
src=
"../../../assets/image/head/logo.png"
alt=
"Logo"
alt=
"Logo"
/>
/>
</a>
</a>
<!-- End Default Logo -->
<!-- End Default Logo -->
...
@@ -19,37 +19,37 @@
...
@@ -19,37 +19,37 @@
<!-- Nav items-->
<!-- Nav items-->
<template
v-for=
"nav in navList"
>
<template
v-for=
"nav in navList"
>
<li
<li
v-if=
"nav.children && nav.children.length > 0"
v-if=
"nav.children && nav.children.length > 0"
class=
"gs-nav-item nav-item"
class=
"gs-nav-item nav-item"
:key=
"nav.id"
:key=
"nav.id"
:class=
"
{ active: currentNav === nav.id }"
:class=
"
{ active: currentNav === nav.id }"
@click="handleNavClick(nav,$event)"
@click="handleNavClick(nav,$event)"
>
>
<a
<a
:id=
"`gs-nav-item-$
{nav.id}`"
:id=
"`gs-nav-item-$
{nav.id}`"
class="nav-link"
class="nav-link"
aria-current="page"
aria-current="page"
href="javascript:void(0)"
href="javascript:void(0)"
role="button"
role="button"
data-bs-toggle="dropdown"
data-bs-toggle="dropdown"
aria-expanded="false"
aria-expanded="false"
>
{{
nav
.
name
}}
</a
>
{{
nav
.
name
}}
</a
>
>
<!-- Dropdown Menu -->
<!-- Dropdown Menu -->
<HeaderDropdown
:nav=
"nav"
@
itemClick=
"handleItemClick"
/>
<HeaderDropdown
:nav=
"nav"
@
itemClick=
"handleItemClick"
/>
<!-- End Dropdown Menu -->
<!-- End Dropdown Menu -->
</li>
</li>
<li
<li
v-else
v-else
:key=
"nav.id"
:key=
"nav.id"
@
click=
"handleNavClick(nav,$event)"
@
click=
"handleNavClick(nav,$event)"
class=
"gs-nav-item nav-item"
class=
"gs-nav-item nav-item"
:class=
"
{ active: currentNav === nav.id }"
:class=
"
{ active: currentNav === nav.id }"
>
>
<a
class=
"nav-link"
href=
"javascript:void(0)"
>
{{
<a
class=
"nav-link"
href=
"javascript:void(0)"
>
{{
nav
.
name
nav
.
name
}}
</a>
}}
</a>
</li>
</li>
</
template
>
</
template
>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<!-- End Collapse -->
<!-- End Collapse -->
<!-- Button -->
<!-- Button -->
<HeaderBtn/>
<HeaderBtn
/>
<!-- End Button -->
<!-- End Button -->
</nav>
</nav>
</div>
</div>
...
@@ -205,6 +205,7 @@ export default {
...
@@ -205,6 +205,7 @@ export default {
.header-btn
{
.header-btn
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-left
:
15px
;
}
}
//
导航
item
样式
//
导航
item
样式
...
@@ -230,8 +231,13 @@ export default {
...
@@ -230,8 +231,13 @@ export default {
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#002c6c
;
color
:
#002c6c
;
padding
:
10px
8px
;
padding
:
10px
15px
;
margin
:
0
16px
;
//
margin
:
0
16px
;
border-radius
:
4px
;
&:hover
{
background-color
:
#e5f0fc
;
}
}
}
}
}
...
@@ -267,22 +273,26 @@ export default {
...
@@ -267,22 +273,26 @@ export default {
margin-left
:
0
;
margin-left
:
0
;
font-size
:
0.875rem
;
font-size
:
0.875rem
;
}
}
.link-item
{
color
:
#00799e
;
}
}
}
@media
(
max-width
:
1400px
)
{
@media
(
max-width
:
1400px
)
{
//
导航
item
边距
//
导航
item
边距
.gs-header-nav
.gs-nav-item.nav-item
{
//
.gs-header-nav
.gs-nav-item.nav-item
{
>
a
{
//
>
a
{
margin
:
0
8px
;
//
margin
:
0
8px
;
}
//
}
}
//
}
}
}
@media
(
max-width
:
1200px
)
{
@media
(
max-width
:
1200px
)
{
//
导航
item
边距
//
导航
item
边距
.gs-header-nav
.gs-nav-item.nav-item
{
.gs-header-nav
.gs-nav-item.nav-item
{
>
a
{
>
a
{
margin
:
0
2
px
;
padding
:
10px
10
px
;
}
}
}
}
}
}
...
@@ -300,5 +310,10 @@ export default {
...
@@ -300,5 +310,10 @@ export default {
.navbar-expand-lg.navbar-end
.navbar-sticky-top-scroller
{
.navbar-expand-lg.navbar-end
.navbar-sticky-top-scroller
{
margin-left
:
auto
;
margin-left
:
auto
;
}
}
//
.gs-header-nav
.gs-nav-item.nav-item
{
//
>
a
{
//
}
//
}
}
}
</
style
>
</
style
>
src/components/layout/header/mock.js
View file @
c849cf12
...
@@ -544,7 +544,7 @@ export const nav = [
...
@@ -544,7 +544,7 @@ export const nav = [
id
:
"5"
,
id
:
"5"
,
name
:
"资讯中心"
,
name
:
"资讯中心"
,
index
:
5
,
index
:
5
,
link
:
""
,
link
:
"
/News/index
"
,
children
:
[
children
:
[
{
{
id
:
uuid
(
"gs_nav"
),
id
:
uuid
(
"gs_nav"
),
...
...
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