index.vue 1.4 KB

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