index.vue 748 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view class="hc-sys-box" :class="[tabbar ? 'is-tabbar' : '', ui]">
  3. <hc-nav-bar id="hc-nav-bar" :ui="navBarUi" v-if="isNavBars">
  4. <slot name="navBar"></slot>
  5. </hc-nav-bar>
  6. <slot></slot>
  7. <hc-tabbar v-if="tabbar"/>
  8. <!--检测升级-->
  9. <hc-update/>
  10. </view>
  11. </template>
  12. <script setup>
  13. import {ref, watch} from "vue";
  14. const props = defineProps({
  15. ui: String,
  16. tabbar: Boolean,
  17. navBarUi: String,
  18. isNavBar: {
  19. type: Boolean,
  20. default: true
  21. }
  22. });
  23. const isNavBars = ref(props.isNavBar)
  24. //监听
  25. watch(() => [
  26. props.isNavBar,
  27. ], ([val]) => {
  28. isNavBars.value = val
  29. })
  30. </script>
  31. <style scoped lang="scss">
  32. @import "./style.scss";
  33. </style>