45 lines
802 B
Vue
45 lines
802 B
Vue
<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>
|