Files
pad-ndxy-uni/components/NavBar.vue
2025-02-17 19:01:32 +08:00

73 lines
1.5 KiB
Vue

<template>
<view class="zd-row header">
<view class="zd-col-8 home_title">{{title}}</view>
<view class="zd-col-8 zd-row jcflexend home_userinfo">
<view v-if="type === '1'" class="exit_text" @tap="Quit">退出</view>
<view v-if="type === '2'" class="exit_text" @tap="toHome">返回</view>
<view v-if="type === '3'" class="exit_text" @tap="toBack">返回</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
props: {
title: String,
type: {
type: String,
default: '1'
}
},
methods: {
Quit () {
this.$store.dispatch('delUserInfo', '')
uni.redirectTo({
url: '/pages/login/login'
})
},
toHome () {
uni.redirectTo({
url: '/pages/home/home'
})
},
toBack () {
uni.navigateBack()
}
}
}
</script>
<style lang="stylus">
@import '@/common/style/mixin.styl';
.header
position fixed
top var(--status-bar-height)
left 0
_wh(100%, 38.5px)
padding 0 20px
align-items flex-start
justify-content flex-end
_bis(,'../static/images/bg_header.png', 100%, 100%,bottom)
.home_title
_font(20px,38.5px, #8DBFEE, bold, center)
font-family 'SourceHanSansCN-Bold'
font-style italic
background linear-gradient(0deg, #A2C3E3 0%, #5E9ED9 11.9140625%, #A2C3E3 100%)
-webkit-background-clip text
-webkit-text-fill-color transparent
border-bottom 0
padding 0
.home_userinfo
height 100%
.exit_text
height 21.5px
padding 0 7px
border 1px solid #68AFF4
background linear-gradient(to bottom, #152B56, #1B4181)
_font(14px,21.5px, #fff,,)
</style>