Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
6214543b
Commit
6214543b
authored
Oct 19, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
318381cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
index.vue
src/components/NavBar/index.vue
+18
-21
No files found.
src/components/NavBar/index.vue
View file @
6214543b
<
template
>
<div
class=
"navbar w-full"
style=
"z-index: 300"
>
<div
class=
"navbar w-full"
style=
"z-index: 300"
v-if=
"!bangsBlock"
>
<div
class=
"h-full theBar flex items-end px-5 justify-center relative"
class=
"h-full theBar flex items-end px-5 justify-center relative
h46
"
style=
"background:#F7F7FA; padding-bottom: 8px;"
:class=
"isBangs ? 'h72' : 'h46'"
:style=
"[(isBangs && bangsBlock) ? 'height: calc(72px - 24px - 8px)' : '']"
:style=
"[isBangs ? 'height:' + `$
{46 + heightOfNotch}px` : '']"
v-bind="$attrs"
v-if=
"(!isBangs && !bangsBlock || isBangs)"
>
<div
class=
"relative w-full flex items-center justify-center"
v-if=
"(!isBangs && !bangsBlock) || (isBangs)"
>
<div
class=
"relative w-full flex items-center justify-center"
>
<icon
v-if=
"
!bangsBlock &&
showBackIcon"
v-if=
"showBackIcon"
@
click=
"$router.go(-1)"
name=
"icon-fanhui"
class=
"absolute left-0"
...
...
@@ -40,10 +35,15 @@
</div>
</div>
<div
:class=
"isBangs ? 'h72' : 'h46'"
v-if=
"!isBangs && !bangsBlock && occupyPosition || (isBangs && !bangsBlock)"
class=
"h46"
:style=
"[isBangs ? 'height:' + `$
{46 + heightOfNotch}px` : '']"
v-if="occupyPosition"
>
</div>
<div
style=
"height: calc(72px - 24px - 8px)"
v-if=
"isBangs && bangsBlock"
></div>
</div>
<div
v-else
>
<div
:style=
"
{
'height': heightOfNotch + 'px'
}" v-if="isBangs">
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -90,16 +90,16 @@ export default defineComponent({
},
computed
:
{
isBangs
()
{
return
false
return
true
},
heightOfNotch
()
{
// 刘海屏的刘海高度 单位px
return
0
;
}
}
});
</
script
>
<
style
lang=
"less"
scoped
>
.navbar {
.h72 {
height: 72px;
}
.h46 {
height: 46px;
}
...
...
@@ -109,11 +109,8 @@ export default defineComponent({
left: 0;
right: 0;
z-index: 300;
// height: 72px;
}
.some-block {
// height: 72px;
}
.title {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
...
...
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