This commit is contained in:
zhaofang
2022-11-11 18:52:22 +08:00
parent c0950fbb96
commit 1f38d830a0
3 changed files with 95 additions and 85 deletions

View File

@@ -1,9 +1,10 @@
<template>
<view class="top">
<view v-show="showBack" class="back" @click="toBack()">
<text class="arrow"></text>
<u-icon name="arrow-left"></u-icon>
</view>
<view class="title"><slot></slot> </view>
<view><slot></slot> </view>
<view @click="topgae()" style="color: #387DF7;"><slot name="right"></slot> </view>
</view>
</template>
@@ -17,6 +18,10 @@
showBack:{
type:Boolean,
default:false
},
goPgae:{
type:String,
default:''
}
},
data() {
@@ -25,6 +30,13 @@
}
},
methods: {
topgae() {
if(this.goPgae!=''){
uni.navigateTo({
url:this.goPgae
});
}
},
toBack(){
if(this.backUrl!=''){
if(this.backUrl == '/pages/my/index'){
@@ -60,11 +72,15 @@
// display: none;
// background:linear-gradient(to bottom,#6BA0FC, #6297FD);
background-color: #fff;
display: flex;
justify-content: space-between;
.back{
float: left;
// float: left;
color: #000;
padding-top:8px;
padding-left: 15px;
padding-top:6px;
height: 40px;
line-height: 40px;
// padding-left: 15px;
}
.title{
text-align: center;
@@ -79,18 +95,18 @@
line-height: 40px;
}
}
.arrow:before {
content: " ";
display: inline-block;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
height: .5rem;
width: .5rem;
border-width: 0 0 2px 2px;
border-color: #FFFFFF;
border-style: solid;
position: relative;
top: 0
}
// .arrow:before {
// content: " ";
// display: inline-block;
// -webkit-transform: rotate(45deg);
// -ms-transform: rotate(45deg);
// transform: rotate(45deg);
// height: .5rem;
// width: .5rem;
// border-width: 0 0 2px 2px;
// border-color: #FFFFFF;
// border-style: solid;
// position: relative;
// top: 0
// }
</style>