更新打包配置
This commit is contained in:
+150
-150
@@ -1,150 +1,150 @@
|
||||
<template>
|
||||
<view class="header" :style="{backgroundColor:bgColor,height:height,borderBottomWidth:borderWidth}">
|
||||
<view class="header-left">
|
||||
<view class="header-left" v-if="isBack" @click="goback">
|
||||
<u-icon :size="fontSize" name="arrow-left" :color="color"></u-icon>
|
||||
</view>
|
||||
<slot name="left" v-else>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="header-mid">
|
||||
<slot name="mid" v-if="isMid">
|
||||
|
||||
</slot>
|
||||
<text v-else :style="{fontSize:fontSize,fontWeight:fontWeight,color:color}">{{title}}</text>
|
||||
</view>
|
||||
<view class="header-right">
|
||||
<slot name="right">
|
||||
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* 共用头部
|
||||
* title:中间标题 默认空
|
||||
* bgColor:背景色 默认#fff
|
||||
* height:高度 默认88rpx
|
||||
* isBack:是否打开左方返回 默认打开
|
||||
* borderWidth:下划线 默认无
|
||||
* fontSize:返回箭头 中间字体大小 默认30rpx
|
||||
* fontWeight:中间字体字重 默认加粗
|
||||
* color:返回箭头 中间字体颜色 默认#333
|
||||
* slot->left:左边插槽 开启后要将isBack传false
|
||||
* slot->right:右边插槽
|
||||
* isReturn 抛出返回方法
|
||||
*/
|
||||
export default {
|
||||
props:{
|
||||
black:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
isMid:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
title:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
bgColor:{
|
||||
type:String,
|
||||
default:'#fff'
|
||||
},
|
||||
height:{
|
||||
type:String,
|
||||
default:'88rpx'
|
||||
},
|
||||
isBack:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
borderWidth:{
|
||||
type:String,
|
||||
default:'0'
|
||||
},
|
||||
fontSize:{
|
||||
type:String,
|
||||
default:'36rpx'
|
||||
},
|
||||
fontWeight:{
|
||||
type:String,
|
||||
default:'bold'
|
||||
},
|
||||
color:{
|
||||
type:String,
|
||||
default:'#333'
|
||||
},
|
||||
isReturn:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods: {
|
||||
goback(){
|
||||
if(this.isReturn){
|
||||
this.$emit('return');
|
||||
}else{
|
||||
console.log('2312313')
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header{
|
||||
width:100vw;
|
||||
height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom-style: solid;
|
||||
font-weight: bold;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
.header-left{
|
||||
width:48rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
background: rgba(0,0,0,0.2);
|
||||
border-radius: 8rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.left-img{
|
||||
width:18rpx;
|
||||
height:30rpx;
|
||||
}
|
||||
}
|
||||
.header-right{
|
||||
min-width:240rpx;
|
||||
height:56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.header-mid{
|
||||
color: #fff;
|
||||
flex:1;
|
||||
height:100%;
|
||||
margin-left: 32rpx;
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<view class="header" :style="{backgroundColor:bgColor,height:height,borderBottomWidth:borderWidth}">
|
||||
<view class="header-left">
|
||||
<view class="header-left" v-if="isBack" @click="goback">
|
||||
<u-icon :size="fontSize" name="arrow-left" :color="color"></u-icon>
|
||||
</view>
|
||||
<slot name="left" v-else>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="header-mid">
|
||||
<slot name="mid" v-if="isMid">
|
||||
|
||||
</slot>
|
||||
<text v-else :style="{fontSize:fontSize,fontWeight:fontWeight,color:color}">{{title}}</text>
|
||||
</view>
|
||||
<view class="header-right">
|
||||
<slot name="right">
|
||||
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* 共用头部
|
||||
* title:中间标题 默认空
|
||||
* bgColor:背景色 默认#fff
|
||||
* height:高度 默认88rpx
|
||||
* isBack:是否打开左方返回 默认打开
|
||||
* borderWidth:下划线 默认无
|
||||
* fontSize:返回箭头 中间字体大小 默认30rpx
|
||||
* fontWeight:中间字体字重 默认加粗
|
||||
* color:返回箭头 中间字体颜色 默认#333
|
||||
* slot->left:左边插槽 开启后要将isBack传false
|
||||
* slot->right:右边插槽
|
||||
* isReturn 抛出返回方法
|
||||
*/
|
||||
export default {
|
||||
props:{
|
||||
black:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
isMid:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
title:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
bgColor:{
|
||||
type:String,
|
||||
default:'#fff'
|
||||
},
|
||||
height:{
|
||||
type:String,
|
||||
default:'88rpx'
|
||||
},
|
||||
isBack:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
borderWidth:{
|
||||
type:String,
|
||||
default:'0'
|
||||
},
|
||||
fontSize:{
|
||||
type:String,
|
||||
default:'36rpx'
|
||||
},
|
||||
fontWeight:{
|
||||
type:String,
|
||||
default:'bold'
|
||||
},
|
||||
color:{
|
||||
type:String,
|
||||
default:'#333'
|
||||
},
|
||||
isReturn:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods: {
|
||||
goback(){
|
||||
if(this.isReturn){
|
||||
this.$emit('return');
|
||||
}else{
|
||||
console.log('2312313')
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header{
|
||||
width:100vw;
|
||||
height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom-style: solid;
|
||||
font-weight: bold;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
.header-left{
|
||||
width:48rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
background: rgba(0,0,0,0.2);
|
||||
border-radius: 8rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.left-img{
|
||||
width:18rpx;
|
||||
height:30rpx;
|
||||
}
|
||||
}
|
||||
.header-right{
|
||||
min-width:240rpx;
|
||||
height:56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.header-mid{
|
||||
color: #fff;
|
||||
flex:1;
|
||||
height:100%;
|
||||
margin-left: 32rpx;
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user