Files
pad-nl-three-uni/components/NavBar.vue

80 lines
1.5 KiB
Vue
Raw Normal View History

2024-02-20 16:29:38 +08:00
<template>
<view class="header">
<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>
<script>
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 {
2024-05-09 13:29:16 +08:00
uni.redirectTo({
url: '/pages/home/home'
})
// uni.navigateBack()
2024-02-20 16:29:38 +08:00
}
},
backHome () {
2024-05-09 13:29:16 +08:00
uni.redirectTo({
url: '/pages/home/home'
})
// uni.navigateBack()
2024-02-20 16:29:38 +08:00
}
}
}
</script>
<style lang="stylus">
@import '@/common/style/mixin.styl';
.header
_fj()
2024-03-04 15:15:15 +08:00
_wh(100%, 30px)
background-color #041427
2024-03-04 15:15:15 +08:00
border-bottom 1px solid #13568B
2024-02-20 16:29:38 +08:00
z-index 200
2024-03-04 15:15:15 +08:00
padding 0 10px
box-shadow: 0 1px 2px 0 RGBA(19, 86, 139, 0.5);
2024-02-20 16:29:38 +08:00
.page_name
2024-03-04 15:15:15 +08:00
_font(22px, 30px, #F6F9FE,700,center)
font-family: YouSheBiaoTiHei
background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(49,190,255,0.9) 0%, rgba(239,252,254,1) 40%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
2024-02-20 16:29:38 +08:00
.icon_back {
2024-03-04 15:15:15 +08:00
font-size: 26px;
line-height: 30px;
color: #fff;
2024-02-20 16:29:38 +08:00
}
.icon_home {
2024-03-04 15:15:15 +08:00
font-size: 26px;
line-height: 30px;
color: #fff;
2024-02-20 16:29:38 +08:00
}
</style>