-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d16c85b
commit ec2c8cb
Showing
5 changed files
with
98 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<template> | ||
<view class="index-nav"> | ||
<view class="index-nav-inner" :style="navbarStyle"> | ||
<view class="index-nav-content" > | ||
<image class="index-nav-image" src="/static/title-logo-x.png" mode="aspectFit"></image> | ||
<text class="index-nav-version">0.1.5</text> | ||
</view> | ||
</view> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "index-nav", | ||
data() { | ||
return { | ||
statusBarHeight: 0 | ||
}; | ||
}, | ||
computed: { | ||
navbarStyle() : string { | ||
return `margin-top:${this.statusBarHeight}px` | ||
} | ||
}, | ||
created() { | ||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight | ||
}, | ||
mounted() { | ||
setTimeout(() => { | ||
uni.setNavigationBarColor({ | ||
frontColor: '#000000', | ||
backgroundColor: '#ffffff' | ||
}) | ||
}, 100) | ||
}, | ||
methods: { | ||
back() { | ||
uni.navigateBack({}) | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style> | ||
.index-nav { | ||
border: 1px #eee solid; | ||
background-color: #fff; | ||
} | ||
.index-nav-inner { | ||
position: relative; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
height: 45px; | ||
} | ||
|
||
.index-nav-content { | ||
position: absolute; | ||
height: 100%; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.index-nav-image { | ||
width: 540rpx; | ||
} | ||
.index-nav-version { | ||
background-color: #007AFF; | ||
font-size: 24rpx; | ||
color: white; | ||
padding: 6rpx 12rpx; | ||
border-radius: 6rpx; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters