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
0a1f15e3
Commit
0a1f15e3
authored
Oct 19, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 根据得到的刘海高度,设置navbar
parent
819982f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
App.vue
src/App.vue
+3
-1
index.vue
src/components/NavBar/index.vue
+2
-1
AppStore.ts
src/store/AppStore.ts
+3
-0
No files found.
src/App.vue
View file @
0a1f15e3
...
...
@@ -25,6 +25,7 @@ import router from "./router";
import
{
useRoute
}
from
"vue-router"
;
import
Bridge
from
'@/utils/jsBridge2'
import
{
chatAuthCheck
}
from
"./utils/authCheck"
;
import
{
notchHeight
}
from
"./store/AppStore"
;
export
default
defineComponent
({
...
...
@@ -32,7 +33,8 @@ export default defineComponent({
onBeforeMount
(()
=>
{
new
Bridge
().
getNotchHeight
(
null
,
(
height
:
any
)
=>
{
console
.
log
(
height
,
' show notch height'
)
height
=
Number
(
height
)
notchHeight
.
value
=
height
;
})
})
...
...
src/components/NavBar/index.vue
View file @
0a1f15e3
...
...
@@ -47,6 +47,7 @@
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
notchHeight
}
from
"@/store/AppStore"
;
import
{
defineComponent
}
from
"vue"
;
import
Icon
from
"../common/Icon.vue"
;
export
default
defineComponent
({
...
...
@@ -93,7 +94,7 @@ export default defineComponent({
return
true
},
heightOfNotch
()
{
// 刘海屏的刘海高度 单位px
return
0
;
return
notchHeight
.
value
;
}
}
});
...
...
src/store/AppStore.ts
0 → 100644
View file @
0a1f15e3
import
{
ref
}
from
'@vue/runtime-dom'
export
const
notchHeight
=
ref
(
0
)
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