Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
向伟
educationStu
Commits
b9034663
Commit
b9034663
authored
Jan 07, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e298b48c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
5 deletions
+61
-5
navbar.vue
src/components/navbar.vue
+36
-0
index.vue
src/pages/index/index.vue
+25
-5
No files found.
src/components/navbar.vue
0 → 100644
View file @
b9034663
<
template
>
<view
class=
"navbar"
:style=
"
{'padding-top':`${statusBarHeight}px`}">
<slot></slot>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
setup
()
{
let
data
=
reactive
({
statusBarHeight
:
24
});
const
os
=
uni
.
getSystemInfoSync
();
data
.
statusBarHeight
=
os
.
statusBarHeight
return
{
...
toRefs
(
data
),
};
},
};
</
script
>
<
style
scoped
>
.navbar
{
height
:
100
rpx
;
}
</
style
>
src/pages/index/index.vue
View file @
b9034663
<
template
>
<view
class=
"page-box"
>
<van-nav-bar
:border=
"fasle"
fixed
:z-index=
"99"
>
<
!--
<
van-nav-bar
:border=
"fasle"
fixed
:z-index=
"99"
>
<view
slot=
"left"
class=
"page-title"
title=
"shouye"
>
首页
</view>
</van-nav-bar>
<view
class=
"con"
:style=
"
{ 'padding-top': `${statusBarHeight}px` }">
<view
style=
"height: 100rpx"
></view>
</van-nav-bar>
-->
<navbar>
<view
class=
"navbar-con"
>
<view
class=
"pagetitle"
>
首页
</view>
</view>
</navbar>
<view
class=
"con"
>
<view
class=
"personInfo flex flex_start_center"
>
<van-image
round
...
...
@@ -308,9 +314,11 @@ import { getIndexInfo } from "../../api/index";
import
{
getActivityList
}
from
"../../api/activity"
;
import
{
desensitization
}
from
"../../utils/index"
;
import
indexassembly
from
'./components/indexassembly.vue'
import
navbar
from
'../../components/navbar.vue'
export
default
{
components
:
{
indexassembly
,
navbar
,
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
...
...
@@ -527,9 +535,21 @@ export default {
</
script
>
<
style
scoped
>
.navbar-con
{
height
:
100%
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
display
:
flex
;
align-items
:
center
;
}
.pagetitle
{
font-size
:
46
rpx
;
font-weight
:
800
;
color
:
#111111
;
}
.con
{
box-sizing
:
border-box
;
padding
:
100
rpx
30
rpx
50
rpx
;
/* padding: 0rpx 30rpx 50rpx; */
}
.page-title
{
...
...
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