index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div
  3. class="vab-layout-vertical"
  4. :class="{
  5. fixed: fixedHeader,
  6. 'no-tabs-bar': !showTabs,
  7. }"
  8. >
  9. <vab-side-bar />
  10. <div v-if="device === 'mobile' && !collapse" class="vab-modal" @click="foldSideBar"></div>
  11. <div
  12. class="vab-main"
  13. :class="{
  14. 'is-collapse-main': collapse,
  15. 'is-no-tabs': !showTabs,
  16. }"
  17. >
  18. <div
  19. class="vab-layout-header"
  20. :class="{
  21. 'fixed-header': fixedHeader,
  22. 'is-no-tabs': !showTabs,
  23. }"
  24. >
  25. <vab-nav />
  26. <vab-tabs v-show="showTabs" />
  27. </div>
  28. <vab-app-main />
  29. </div>
  30. </div>
  31. </template>
  32. <script lang="ts" setup>
  33. import { useSettingsStore } from '/@/store/modules/settings'
  34. defineOptions({
  35. name: 'VabLayoutVertical',
  36. })
  37. defineProps({
  38. collapse: {
  39. type: Boolean,
  40. default: false,
  41. },
  42. fixedHeader: {
  43. type: Boolean,
  44. default: true,
  45. },
  46. showTabs: {
  47. type: Boolean,
  48. default: true,
  49. },
  50. device: {
  51. type: String,
  52. default: 'desktop',
  53. },
  54. })
  55. const settingsStore = useSettingsStore()
  56. const { foldSideBar } = settingsStore
  57. </script>