AboutView.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <div class="about-view">
  3. <menu
  4. class="tab-bar"
  5. >
  6. <button
  7. :class="{
  8. active: $route.meta.aboutTabIdx === 0
  9. }"
  10. @click="$router.push({
  11. name: 'InstitutionView'
  12. })"
  13. >
  14. 机构
  15. </button>
  16. <button
  17. :class="{
  18. active: $route.meta.aboutTabIdx === 1
  19. }"
  20. @click="$router.push({
  21. name: 'VisitView'
  22. })"
  23. >
  24. 参观
  25. </button>
  26. <button
  27. :class="{
  28. active: $route.meta.aboutTabIdx === 2
  29. }"
  30. @click="$router.push({
  31. name: 'ExhibitionView'
  32. })"
  33. >
  34. 展览
  35. </button>
  36. <button
  37. :class="{
  38. active: $route.meta.aboutTabIdx === 3
  39. }"
  40. @click="$router.push({
  41. name: 'ServiceView'
  42. })"
  43. >
  44. 服务
  45. </button>
  46. <button
  47. :class="{
  48. active: $route.meta.aboutTabIdx === 4
  49. }"
  50. @click="$router.push({
  51. name: 'ConsultView'
  52. })"
  53. >
  54. 咨询
  55. </button>
  56. <button
  57. :class="{
  58. active: $route.meta.aboutTabIdx === 5
  59. }"
  60. @click="$router.push({
  61. name: 'CollectionView'
  62. })"
  63. >
  64. 典藏
  65. </button>
  66. </menu>
  67. <router-view />
  68. </div>
  69. </template>
  70. <script setup>
  71. import { ref, computed, watch, onMounted, onBeforeUnmount, inject } from "vue"
  72. import { useRoute, useRouter } from "vue-router"
  73. import { useStore } from "vuex"
  74. const route = useRoute()
  75. const router = useRouter()
  76. const store = useStore()
  77. const $env = inject('$env')
  78. </script>
  79. <style lang="less" scoped>
  80. .about-view{
  81. position: absolute;
  82. left: 0;
  83. top: 0;
  84. width: 100%;
  85. height: 100%;
  86. >menu.tab-bar{
  87. position: absolute;
  88. top: 5px;
  89. left: 0;
  90. width: 100%;
  91. height: 51px;
  92. background: linear-gradient( 90deg, rgba(88,148,152,0.2) 0%, #589498 50%, rgba(88,148,152,0.2) 100%);
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. gap: 78px;
  97. z-index: 1;
  98. >button{
  99. flex: 0 0 auto;
  100. font-family: Source Han Sans CN, Source Han Sans CN;
  101. font-weight: 400;
  102. font-size: 18px;
  103. color: #FFFFFF;
  104. line-height: 21px;
  105. }
  106. >button.active{
  107. font-family: Source Han Sans CN, Source Han Sans CN;
  108. font-weight: bold;
  109. font-size: 18px;
  110. color: #FFE794;
  111. line-height: 21px;
  112. text-shadow: 0px 1px 2px rgba(0,0,0,0.25);
  113. }
  114. }
  115. }
  116. </style>