index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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() {
  40. return false
  41. },
  42. },
  43. fixedHeader: {
  44. type: Boolean,
  45. default() {
  46. return true
  47. },
  48. },
  49. showTabs: {
  50. type: Boolean,
  51. default() {
  52. return true
  53. },
  54. },
  55. device: {
  56. type: String,
  57. default() {
  58. return 'desktop'
  59. },
  60. },
  61. })
  62. </script>
  63. <style lang="scss" scoped>
  64. .vab-layout-horizontal {
  65. :deep() {
  66. .vab-main {
  67. width: 92% !important;
  68. margin: auto !important;
  69. }
  70. }
  71. .vab-tabs-horizontal {
  72. background: var(--el-color-white);
  73. }
  74. .vab-nav {
  75. .fold-unfold {
  76. display: none;
  77. }
  78. }
  79. }
  80. </style>