index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div
  3. class="vab-layout-fall"
  4. :class="{
  5. fixed: fixedHeader,
  6. 'no-tabs-bar': !showTabs,
  7. }"
  8. >
  9. <vab-fall-bar />
  10. <div
  11. class="vab-main"
  12. :class="{
  13. 'is-collapse-main': collapse,
  14. 'is-no-tabs': !showTabs,
  15. }"
  16. >
  17. <div
  18. class="vab-layout-header"
  19. :class="{
  20. 'fixed-header': fixedHeader,
  21. 'is-no-tabs': !showTabs,
  22. }"
  23. >
  24. <vab-nav />
  25. <vab-tabs v-show="showTabs" />
  26. </div>
  27. <vab-app-main />
  28. </div>
  29. </div>
  30. </template>
  31. <script lang="ts" setup>
  32. defineOptions({
  33. name: 'VabLayoutFall',
  34. })
  35. defineProps({
  36. collapse: {
  37. type: Boolean,
  38. default: false,
  39. },
  40. fixedHeader: {
  41. type: Boolean,
  42. default: true,
  43. },
  44. showTabs: {
  45. type: Boolean,
  46. default: true,
  47. },
  48. })
  49. </script>
  50. <style lang="scss" scoped>
  51. .vab-layout-fall {
  52. .vab-main {
  53. &.is-collapse-main {
  54. &.vab-main-horizontal,
  55. &.vab-main-semicircle {
  56. margin-left: calc(var(--el-left-menu-width-min) * 1.4);
  57. :deep() {
  58. .fixed-header {
  59. width: calc(100% - var(--el-left-menu-width-min) * 1.4);
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. </style>