screenEntry.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div class="common-box" style="margin-top: 20px">
  3. <TopTitle icon="daping" title="大屏入口" />
  4. <div class="sys-container">
  5. <div
  6. v-for="(item, index) in screenData"
  7. :key="index"
  8. class="sys-item"
  9. @click="gotoScreen(item.routeName)"
  10. >
  11. <img alt="" class="sys-item-img" />
  12. <h3 class="sys-item-title">{{ item.name }}</h3>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script lang="ts" setup>
  18. import TopTitle from "@/components/TopTitle.vue";
  19. const screenData = ref([
  20. { name: "综合大屏", routeName: "totalScreen" },
  21. {
  22. name: "综合大屏",
  23. routeName: "totalScreen",
  24. },
  25. { name: "综合大屏", routeName: "totalScreen" },
  26. { name: "综合大屏", routeName: "totalScreen" },
  27. ]);
  28. const router = useRouter();
  29. const gotoScreen = (routeName: string) => {
  30. router.push({ name: routeName });
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. .sys-container {
  35. display: flex;
  36. flex-wrap: wrap;
  37. justify-content: center;
  38. align-items: center;
  39. }
  40. .sys-item {
  41. min-width: 150px;
  42. padding: 15px;
  43. display: flex;
  44. flex-direction: column;
  45. align-items: center;
  46. .sys-item-img {
  47. width: 120px;
  48. height: 100px;
  49. }
  50. .sys-item-title {
  51. font-size: 18px;
  52. font-weight: bold;
  53. margin-bottom: 10px;
  54. }
  55. }
  56. .sys-item:hover {
  57. background-color: #87cefa;
  58. cursor: pointer;
  59. }
  60. </style>