12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template>
- <view>
- <!-- 自定义导航栏 -->
- <view class="navBarBox">
- <!-- 状态栏占位 -->
- <view class="statusBar"></view>
- <!-- 真正的导航栏内容 -->
- <view class="navBar" :style="{ min_height: statusBarHeight + 'px'}">
- <uni-icons @click="goBack()" type="arrow-left" color="#fff" size="30"></uni-icons>
- <view class="button">未登录</view>
- <image class="logo-image" ></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- import UniIcons from "../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
- export default {
- components: {UniIcons},
- data() {
- return {
- src:"/static/images/left.jpg",
- // 状态栏高度
- statusBarHeight: 0,
- // 导航栏高度
- navBarHeight: 82 + 11,
- };
- },
- props: {},
- //第一次加载时调用
- created() {
- //获取手机状态栏高度
- this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
- }, methods: {
- goBack(){
- uni.navigateBack({
- delta: 2
- });
- },
- }
- }
- </script>
- <style>
- .navBarBox {
- width: 100vw;
- }
- .navBarBox .navBar {
- padding: 3rpx 50rpx;
- padding-bottom: 8rpx;
- color: white;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: black;
- flex-direction: row;
- }
- .navBarBox .navBar .logo-image {
- width: 16rpx;
- height: 16rpx;
- margin-right: 10rpx;
- }
- </style>
|