index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div
  3. class="vab-layout-column"
  4. :class="{
  5. fixed: fixedHeader,
  6. 'no-tabs-bar': !showTabs,
  7. }"
  8. >
  9. <vab-column-bar />
  10. <div
  11. class="vab-main"
  12. :class="{
  13. ['vab-main-' + theme.columnStyle]: true,
  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: 'VabLayoutColumn',
  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. })
  51. const settingsStore = useSettingsStore()
  52. const { theme } = storeToRefs(settingsStore)
  53. </script>
  54. <style lang="scss" scoped>
  55. .vab-layout-column {
  56. .vab-main {
  57. &.is-collapse-main {
  58. &.vab-main-horizontal,
  59. &.vab-main-semicircle {
  60. margin-left: calc(var(--el-left-menu-width-min) * 1.4);
  61. :deep() {
  62. .fixed-header {
  63. width: calc(100% - var(--el-left-menu-width-min) * 1.4);
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. </style>