Files
2025-01-21 01:46:34 +08:00

89 lines
1.6 KiB
Vue

<template>
<view>
<tui-navigation-bar @init="initNavigation" @change="opacityChange" :scrollTop="scrollTop" backgroundColor="#fff" color="#333">
<detailNavbar @onTab="onTab" :scrollTop="scrollTop" />
</tui-navigation-bar>
</view>
</template>
<script>
import tuiNavigationBar from "@/components/thorui/tui-navigation-bar/tui-navigation-bar.vue";
import detailNavbar from '@/pages/user/detail/components/detail-navbar.vue';
export default {
components: {
tuiNavigationBar,
detailNavbar,
},
props: {
title: {
type: String,
default: '',
},
//滚动条滚动距离
scrollTop: {
type: [Number, String],
default: 0
},
},
data() {
return {
top: 0, //标题图标距离顶部距离
opacity: 0,
height: 0,
}
},
methods: {
initNavigation(e) {
this.height = e.height;
this.opacity = e.opacity;
this.top = e.top;
this.$emit('initNav', e);
},
opacityChange(e) {
this.opacity = e.opacity;
},
onTab(e) {
this.$emit('onTab', e);
},
}
}
</script>
<style lang="scss" scoped>
.content-bpx {
color: #fff;
display: flex;
align-items: center;
height: 44px;
justify-content: center;
.left-box {
display: flex;
position: absolute;
left: 0;
}
.nickname {
position: absolute;
width: 100px;
display: flex;
justify-content: center;
align-items: center;
height: 44px;
font-size: 15px;
font-weight: bolder;
color: #1f2122;
}
.set-btn {
padding: 0 15px;
height: 44px;
display: flex;
align-items: center;
}
}
</style>