123456789101112131415161718192021222324252627282930313233 |
- <template>
- <view class="hc-nav-bar-box" :class="ui">
- <view class="hc-nav-bar" v-if="isNavBar">
- <slot></slot>
- </view>
- </view>
- </template>
- <script setup>
- import {ref, watch} from "vue";
- const props = defineProps({
- ui: String,
- isShow: {
- type: Boolean,
- default: true
- }
- });
- //判断是否显示
- const isNavBar = ref(props.isShow)
- //监听表头
- watch(() => [
- props.isShow
- ], ([show]) => {
- isNavBar.value = show
- })
- </script>
- <style scoped lang="scss">
- @import "./style.scss";
- </style>
|