mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 10:26:45 +08:00
提交
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user