info.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <div class="main">
  3. <div class="content">
  4. <sub-header />
  5. <div class="left">
  6. <n-tabs type="line" pane-class="tab-content">
  7. <template #prefix>
  8. <span class="meta-title">
  9. <img src="img/subtitle_1.png" />
  10. </span>
  11. </template>
  12. <n-tab-pane name="展览" tab="展览">
  13. <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
  14. <template v-for="(_, index) in 16">
  15. <n-gi>
  16. <infoBox
  17. :id="index + 1"
  18. title="卡片"
  19. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  20. time="2023-01-02"
  21. />
  22. </n-gi>
  23. </template>
  24. </n-grid>
  25. </n-tab-pane>
  26. <n-tab-pane name="活动" tab="活动">
  27. <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
  28. <template v-for="item in 16">
  29. <n-gi>
  30. <infoBox
  31. title="卡片"
  32. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  33. time="2023-01-02"
  34. />
  35. </n-gi>
  36. </template>
  37. </n-grid>
  38. </n-tab-pane>
  39. <n-tab-pane name="新闻" tab="新闻">
  40. <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
  41. <template v-for="item in 16">
  42. <n-gi>
  43. <infoBox
  44. title="卡片"
  45. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  46. time="2023-01-02"
  47. />
  48. </n-gi>
  49. </template>
  50. </n-grid>
  51. </n-tab-pane>
  52. <n-tab-pane name="通知" tab="通知">
  53. <n-grid y-gap="20" :cols="1" class="tab-grid">
  54. <template v-for="item in 16">
  55. <n-gi>
  56. <notice-box
  57. title="这是一段标题这是一段标题"
  58. content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
  59. time="2023-01-02"
  60. />
  61. </n-gi>
  62. </template>
  63. </n-grid>
  64. </n-tab-pane>
  65. </n-tabs>
  66. </div>
  67. <side-menu />
  68. </div>
  69. </div>
  70. </template>
  71. <script setup>
  72. import { onMounted } from "vue";
  73. import { useFullscreen } from "@vueuse/core";
  74. import infoBox from "../components/infoBox";
  75. import subHeader from "../components/subHeader";
  76. import sideMenu from "../components/sideMenu";
  77. import noticeBox from "../components/noticeBox";
  78. import { useInfoStore } from "../store/info";
  79. const { isFullscreen, enter, exit, toggle } = useFullscreen();
  80. const InfoStore = useInfoStore();
  81. onMounted(() => {
  82. InfoStore.getData();
  83. });
  84. </script>
  85. <style lang="scss" scoped>
  86. .meta-title {
  87. font-size: 1.375rem;
  88. text-align: center;
  89. width: var(--main-sub-nav-title-width);
  90. display: inline-flex;
  91. justify-content: center;
  92. align-items: center;
  93. img {
  94. width: auto;
  95. height: calc(var(--main-sub-nav-height) - 0.75rem);
  96. }
  97. }
  98. :deep(.n-tabs) {
  99. --n-tab-font-size: 1.25rem !important;
  100. --n-tab-gap: 60px !important;
  101. height: 100%;
  102. overflow: hidden;
  103. .n-tab-pane {
  104. overflow-y: scroll;
  105. }
  106. .n-tabs-bar {
  107. height: 0.25rem;
  108. border-radius: 1.875rem !important;
  109. }
  110. }
  111. .tab-content {
  112. width: calc(100% - 12rem);
  113. margin: 0 auto;
  114. &::-webkit-scrollbar {
  115. display: none;
  116. }
  117. }
  118. </style>