automated_uniapp/uni_modules/cool-fixtures/components/fix-top-bar/fix-top-bar.vue

45 lines
802 B
Vue
Raw Normal View History

2025-01-09 16:40:44 +08:00
<template>
<view class="fix-top-bar" v-if="isShow">
<view
v-if="fixed"
:style="{
paddingTop: `${(statusBar ? 0 : statusBarHeight) + 44}px`,
}"
></view>
<cl-topbar
:title="title"
:color="color"
:border="border"
:fixed="fixed"
:showBack="showBack"
:withMp="true"
:background-color="backgroundColor"
></cl-topbar>
</view>
</template>
<script lang="ts" setup name="fix-top-bar">
const { statusBarHeight = 0 } = uni.getSystemInfoSync();
const props = defineProps({
backgroundColor: {
type: String,
default: "#fff",
},
color: {
type: String,
default: "black",
},
title: {
type: String,
default: "",
},
isShow: Boolean,
showBack: Boolean,
border: Boolean,
fixed: Boolean,
statusBar: Boolean,
});
</script>
<style lang="scss" scoped></style>