index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <div
  3. class="vab-layout-horizontal"
  4. :class="{
  5. fixed: fixedHeader,
  6. 'no-tabs-bar': !showTabs,
  7. }"
  8. >
  9. <div
  10. class="vab-layout-header"
  11. :class="{
  12. 'fixed-header': fixedHeader,
  13. }"
  14. >
  15. <vab-header layout="horizontal" />
  16. <div
  17. v-show="showTabs"
  18. :class="{
  19. 'vab-tabs-horizontal': showTabs,
  20. }"
  21. >
  22. <div class="vab-main">
  23. <vab-tabs />
  24. </div>
  25. </div>
  26. </div>
  27. <div class="vab-main main-padding">
  28. <vab-app-main />
  29. </div>
  30. </div>
  31. </template>
  32. <script lang="ts" setup>
  33. defineOptions({
  34. name: 'VabLayoutHorizontal',
  35. })
  36. defineProps({
  37. collapse: {
  38. type: Boolean,
  39. default: false,
  40. },
  41. fixedHeader: {
  42. type: Boolean,
  43. default: true,
  44. },
  45. showTabs: {
  46. type: Boolean,
  47. default: true,
  48. },
  49. device: {
  50. type: String,
  51. default: 'desktop',
  52. },
  53. })
  54. </script>
  55. <style lang="scss" scoped>
  56. .vab-layout-horizontal {
  57. :deep() {
  58. .vab-main {
  59. width: 92% !important;
  60. margin: auto !important;
  61. }
  62. }
  63. .vab-tabs-horizontal {
  64. background: var(--el-color-white);
  65. }
  66. .vab-nav {
  67. .fold-unfold {
  68. display: none;
  69. }
  70. }
  71. }
  72. </style>