Files
GX.O3.WMS/APK/APP_Report/components/navigation-title/navigation-title.vue
T

136 lines
2.4 KiB
Vue
Executable File

<template>
<view>
<view class="navigate_title" @touchmove.stop.prevent="moveHandle">
<view class="status_bar">
<view class="top_view"></view>
</view>
<view class="top_title">
<view class="top_title_view" @tap="leftBtnClick">
<image src="../../static/icon/leftarrowwhite.png"></image>
</view>
<text>{{title}}</text>
<view class="top_title_view" @tap="rightBtnClick">
<text>{{rightButton}}</text>
</view>
</view>
</view>
<view class="status_bar" @touchmove.stop.prevent="moveHandle"></view>
<view class="top_title" @touchmove.stop.prevent="moveHandle"></view>
</view>
</template>
<script>
export default {
props:{
title: {
type:String,
default:""
},
backClick:{
type:Object,
default:null
},
rightButton:{
type:String,
default:""
},
rightClick:{
type:Object,
default:null
}
},
data() {
return {
}
},
methods: {
moveHandle: function(){
return false;
},
leftBtnClick: function(){
if(this.backClick != null) {
this.backClick();
}
},
rightBtnClick: function(){
if(this.rightClick != null) {
this.rightClick();
}
}
}
}
</script>
<style>
.navigate_title {
height: var(--status-bar-height);
width: 100%;
position: fixed;
z-index: 999;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
background-color: #3860F3;
}
.top_view {
height: var(--status-bar-height);
width: 100%;
background-color: #3860F3;
top: 0;
z-index: 999;
}
.top_title{
height: 90rpx;
line-height: 90rpx;
width: 100%;
background-color: #3860F3;
color: #FFFFFF;
text-align: center;
font-size: 16px;
font-weight: 700;
display: flex;
flex-direction: row;
align-items: center;
justify-content:flex-start;
}
.top_title_view{
flex-shrink: 0;
flex-grow: 0;
padding-left: 8px;
height: 90rpx;
width: 90rpx;
line-height: 90rpx;
display: flex;
flex-direction: row;
align-items: center;
text-color: #FFFFFF;
}
.top_title image{
flex-shrink: 0;
flex-grow: 0;
width: 22px;
height: 22px;
}
.top_title text{
flex-shrink: 0;
flex-grow: 1;
text-align: center;
}
.top_title_view text{
text-align: start;
}
</style>