cwg-page-wrapper.vue 796 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="page-wrapper">
  3. <cwg-progress />
  4. <cwg-header v-if="!isHeaderFixed" />
  5. <slot></slot>
  6. <view :style="{ height: isTabBarPage ? '60px' : '0px' }" />
  7. <cwg-tab-bar v-model:isTabBarPage="isTabBarPage" />
  8. </view>
  9. </template>
  10. <script setup>
  11. import { ref } from "vue";
  12. import { onLoad, onShow } from '@dcloudio/uni-app'
  13. import { updateRoute } from '@/hooks/useRoute'
  14. const props = defineProps({
  15. isHeaderFixed: {
  16. type: Boolean,
  17. default: false
  18. }
  19. })
  20. const isTabBarPage = ref(false)
  21. onLoad(() => {
  22. updateRoute()
  23. })
  24. onShow(() => {
  25. updateRoute()
  26. })
  27. </script>
  28. <style lang="scss" scoped>
  29. @import "@/uni.scss";
  30. .page-wrapper {
  31. padding: 0 px2rpx(24) px2rpx(0) px2rpx(24);
  32. box-sizing: border-box;
  33. border: 1px solid rgba(0, 0, 0, 0);
  34. }
  35. </style>