This commit is contained in:
2022-10-11 17:03:44 +08:00
parent 2eab2ecf68
commit f28e95ea2d
13 changed files with 262 additions and 128 deletions

View File

@@ -1,8 +1,8 @@
<template>
<view class="header">
<text class="icon-back"></text>
<text></text>
<text class="icon-home"></text>
<span @tap="goBack" class="iconfont icon_back">&#xe6db;</span>
<span class="page_name">{{title}}</span>
<span @tap="backHome" class="iconfont icon_home" :class="{'vhide': show1 === false}">&#xe69b;</span>
</view>
</template>
@@ -10,8 +10,40 @@
export default {
data() {
return {
};
},
props: {
title: String,
inner: {
type: Boolean,
default: false
},
inner2: {
type: Boolean,
default: false
},
show1: {
type: Boolean,
default: true
}
},
methods: {
goBack () {
if (this.inner) {
uni.navigateBack()
} else if (this.inner2) {
this.$emit('goIn')
} else {
uni.redirectTo({
url: '/pages/home/home'
})
}
},
backHome () {
uni.redirectTo({
url: '/pages/home/home'
})
}
}
}
</script>
@@ -21,7 +53,10 @@
.header
_fj()
position fixed
_wh(100%, 86rpx)
_wh(100%, 72rpx)
background-color $red
z-index 100
padding 0 20rpx
.page_name
_font(32rpx, 32rpx, #fff,700,center)
</style>