cankao-h5/src/components/mini/Navbar.vue

49 lines
957 B
Vue

<template>
<view class="r_all">
<view class="navnar">
<view>
<u-icon name="arrow-left" color="#000" size="22" v-if="hasBack"></u-icon>
</view>
<text>{{ title }}</text>
<view style="width: 15%;"></view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted, onUnmounted, reactive } from "vue";
const props = defineProps({
// 列表内容
title: {
type: String,
default: () => "中证参考",
},
// 是否显示返回按钮
hasBack: {
type: Boolean,
default: () => true,
},
});
onMounted(async () => { });
</script>
<style scoped lang="scss">
.r_all {
position: sticky;
top: 0rpx;
background-color: white;
z-index: 99999;
}
.navnar {
width: 100vw;
height: 120rpx;
color: black;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>