<template name="navBarTop">
|
<!-- 自定义顶部导航栏 -->
|
<!-- <view class="nav-bar-top" @click="gotoMyself()">
|
<view class="nav-bar-top-left">
|
<image :src="navBarImage" />
|
</view>
|
<view class="nav-bar-top-title">我要查</view>
|
</view> -->
|
|
<uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true" >
|
<view class="title" slot="default">{{title}}</view>
|
<view slot="left" class="uni-nav-bar-left" @click="gotoMyself()">
|
<image :src="avatarImage"></image>
|
</view>
|
</uni-nav-bar>
|
</template>
|
|
<script>
|
import uniNavBar from '../../components/uni-nav-bar/uni-nav-bar.vue'
|
export default{
|
props:['title'],
|
components:{uniNavBar},
|
name:"navBarTop",
|
data(){
|
// console.log(title);
|
return{
|
avatarImage:this.$store.state.avatar,
|
}
|
},
|
methods:{
|
//跳转至我的页面
|
gotoMyself(){
|
uni.navigateTo({
|
url:'../myself/myself'
|
// animationType: 'pop-in',
|
// animationDuration: 200
|
})
|
|
// uni.navigateBack({
|
// delta:1,
|
// animationType:'pop-out',
|
// animationDuration:200
|
// });
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.uni-nav-bar-info {
|
// font-weight: 550;
|
|
.title{
|
position: fixed;
|
right: 45%;
|
font-weight: 550;
|
}
|
|
.uni-nav-bar-left{
|
display: flex;
|
justify-items: center;
|
|
image{
|
// background-color: #00BFFF;
|
margin-left: 1rem;
|
width: 1.8rem;
|
height: 1.8rem;
|
border-radius: 100px;
|
}
|
}
|
}
|
</style>
|