nav.vue
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<view class="h5-nav row avarage verCenter">
<text class="iconfont icon-arrleft" v-back></text>
<text class="title">{{ title }}</text>
<view class="bar"><slot name="title-bar"></slot></view>
</view>
</template>
<script>
export default {
name: 'navElement',
props: {
title: {
type: String,
default: '标题'
}
},
data() {
return {};
},
methods: {}
};
</script>
<style scoped lang="scss">
.h5-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
padding-left: 32rpx;
height: 88rpx;
box-sizing: border-box;
z-index: 999;
background-color: #fff;
.iconfont {
width: 33.3%;
font-size: 44rpx;
color: #919399;
}
.title {
width: 33.3%;
font-size: 34rpx;
color: #292b33;
text-align: center;
font-weight: 500;
}
.bar {
width: 33.3%;
padding-right: 32rpx;
box-sizing: border-box;
}
}
</style>