info.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div class="main">
  3. <!-- <div class="head"></div> -->
  4. <!-- <Teleport to=".n-tabs-nav"> xxx </Teleport> -->
  5. <div class="content">
  6. <div class="left">
  7. <n-tabs type="line">
  8. <template #prefix><span class="meta-title">场馆资讯</span> </template>
  9. <n-tab-pane name="展览" tab="展览">
  10. <!-- <n-scrollbar style="height: 100%" trigger="none"> -->
  11. <n-grid x-gap="12" y-gap="12" :cols="3" class="tab-grid">
  12. <template v-for="(_, index) in 16">
  13. <n-gi>
  14. <infoBox
  15. :id="index + 1"
  16. title="卡片"
  17. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  18. time="2023-01-02"
  19. />
  20. </n-gi>
  21. </template>
  22. </n-grid>
  23. </n-tab-pane>
  24. <n-tab-pane name="活动" tab="活动">
  25. <n-grid x-gap="12" y-gap="12" :cols="3" class="tab-grid">
  26. <template v-for="item in 16">
  27. <n-gi>
  28. <infoBox
  29. title="卡片"
  30. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  31. time="2023-01-02"
  32. />
  33. </n-gi>
  34. </template>
  35. </n-grid>
  36. </n-tab-pane>
  37. <n-tab-pane name="新闻" tab="新闻">
  38. <n-grid x-gap="12" y-gap="12" :cols="3" class="tab-grid">
  39. <template v-for="item in 16">
  40. <n-gi>
  41. <infoBox
  42. title="卡片"
  43. cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
  44. time="2023-01-02"
  45. />
  46. </n-gi>
  47. </template>
  48. </n-grid>
  49. </n-tab-pane>
  50. <n-tab-pane name="通知" tab="通知">
  51. <n-grid y-gap="20" :cols="1" class="tab-grid">
  52. <template v-for="item in 16">
  53. <n-gi>
  54. <notice-box
  55. title="这是一段标题这是一段标题"
  56. content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
  57. time="2023-01-02"
  58. />
  59. </n-gi>
  60. </template>
  61. </n-grid>
  62. </n-tab-pane>
  63. </n-tabs>
  64. </div>
  65. <div class="right">
  66. <div class="logo"></div>
  67. <div class="back" @click="$router.push('/')"></div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script setup>
  73. import { onMounted } from "vue";
  74. import { useFullscreen } from "@vueuse/core";
  75. import infoBox from "../components/infoBox";
  76. import noticeBox from "../components/noticeBox";
  77. import { useInfoStore } from "../store/info";
  78. const { isFullscreen, enter, exit, toggle } = useFullscreen();
  79. const InfoStore = useInfoStore();
  80. onMounted(() => {
  81. InfoStore.getData();
  82. });
  83. </script>
  84. <style>
  85. .main {
  86. --main-left-background: grey;
  87. --main-right-background: rgba(0, 0, 0, 0.8);
  88. --logo-width: 100px;
  89. --go-home-width: 60px;
  90. --logo-background-color: rgba(0, 0, 0, 0.5);
  91. --left-content-padding: 50px;
  92. --right-content-padding: 50px;
  93. }
  94. </style>
  95. <style lang="scss" scoped>
  96. .main {
  97. width: 100%;
  98. height: 100%;
  99. display: flex;
  100. flex-direction: column;
  101. overflow-y: hidden;
  102. }
  103. .meta-title {
  104. font-size: 34px;
  105. padding-right: 50px;
  106. }
  107. .head {
  108. width: 100%;
  109. height: 60px;
  110. }
  111. .content {
  112. flex: 1;
  113. display: flex;
  114. width: 100%;
  115. height: 100%;
  116. flex-direction: row;
  117. overflow: hidden;
  118. }
  119. .left {
  120. flex: 1;
  121. background-color: var(--main-left-background);
  122. padding: var(--left-content-padding);
  123. .n-tabs {
  124. height: 100%;
  125. overflow: hidden;
  126. :deep(.n-tab-pane) {
  127. overflow-y: scroll;
  128. }
  129. }
  130. }
  131. .n-tabs {
  132. --n-tab-font-size: 26px !important;
  133. }
  134. .right {
  135. flex: 0 0 10%;
  136. min-width: 120px;
  137. /* max-width: 120px; */
  138. height: calc(100% - var(--right-content-padding) * 2);
  139. background-color: var(--main-right-background);
  140. display: flex;
  141. padding: 50px 0;
  142. flex-direction: column;
  143. align-items: center;
  144. justify-content: space-between;
  145. .logo {
  146. width: var(--logo-width);
  147. height: var(--logo-width);
  148. border-radius: 50%;
  149. background-color: var(--logo-background-color);
  150. }
  151. .back {
  152. width: var(--go-home-width);
  153. height: var(--go-home-width);
  154. border-radius: 50%;
  155. background-color: var(--logo-background-color);
  156. }
  157. }
  158. </style>