PlatformData.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="platform-content">
  3. <div class="flex platform-head-tabs">
  4. <div
  5. class="flex justify-center items-center tab-item"
  6. :class="{ 'tab-item-active': activeName === 'count' }"
  7. @click="activeName = 'count'"
  8. >
  9. 访问次数统计
  10. </div>
  11. <div
  12. class="flex justify-center items-center tab-item"
  13. :class="{ 'tab-item-active': activeName === 'score' }"
  14. @click="activeName = 'score'"
  15. >
  16. 积分统计
  17. </div>
  18. </div>
  19. <Query v-if="activeName === 'count'" />
  20. <Score v-else />
  21. </div>
  22. </template>
  23. <script setup lang="ts">
  24. import { ref } from 'vue';
  25. import Query from './components/query/Query.vue';
  26. import Score from './components/score/Score.vue';
  27. const activeName = ref('count');
  28. </script>
  29. <style scoped lang="scss">
  30. .platform-content {
  31. height: calc(100vh - 64px - 18px);
  32. background-color: rgba(255, 255, 255, 1);
  33. padding: 21px;
  34. }
  35. .platform-head {
  36. height: 56px;
  37. &-name {
  38. margin-left: 24px;
  39. font-size: 16px;
  40. font-weight: 500;
  41. color: #252525;
  42. }
  43. &-tabs {
  44. margin: 18px 0;
  45. .tab-item {
  46. width: 188px;
  47. height: 38px;
  48. background: #fafafa;
  49. border: 1px solid #d9d9d9;
  50. cursor: pointer;
  51. &-active {
  52. color: rgba(22, 119, 255, 1);
  53. background: #e2eefe;
  54. border: 1px solid #1890ff;
  55. }
  56. }
  57. :first-child {
  58. border-radius: 8px 0px 0px 8px;
  59. }
  60. :last-child {
  61. border-radius: 0px 8px 8px 0px;
  62. }
  63. }
  64. }
  65. </style>