page1.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <v-container class="bg-surface-variant mb-6">
  3. <v-row>
  4. <v-col v-for="(item, index) in imgArr" :key="index" cols="4">
  5. <v-card>
  6. <v-img :src="item" cover aspect-ratio="16/9">
  7. </v-img>
  8. </v-card>
  9. </v-col>
  10. </v-row>
  11. <v-row>
  12. <v-col v-for="(item, index) in dataArr" :key="index" cols="2">
  13. <v-card max-width="200" max-height="300" variant="tonal">
  14. <v-card>
  15. <v-img :src="item.img" height="100px" cover aspect-ratio="16/9">
  16. </v-img>
  17. </v-card>
  18. <v-card-item>
  19. <div>
  20. <div>
  21. <p style="font-size: 12px;
  22. display: -webkit-box;
  23. -webkit-line-clamp: 2;
  24. -webkit-box-orient: vertical;
  25. overflow: hidden;
  26. text-overflow: ellipsis;">{{ item.title }}</p>
  27. </div>
  28. </div>
  29. </v-card-item>
  30. <v-card-subtitle>
  31. <p style="font-size: 5px;"> {{ item.subtile }}</p>
  32. </v-card-subtitle>
  33. </v-card>
  34. </v-col>
  35. </v-row>
  36. <br><br>
  37. <v-pagination :length="6" rounded="circle" v-model="page" @click="onPageChange()"></v-pagination>
  38. </v-container>
  39. </template>
  40. <script>
  41. import { reactive , ref } from 'vue'
  42. export default {
  43. setup() {
  44. let imgArr = reactive([
  45. 'https://image.gcores.com/b14b6a4b4cc88d5ff8685518923d2f54-1600-900.jpg?x-oss-process=image/resize,limit_1,m_fill,w_717,h_402/quality,q_90/format,webp',
  46. 'https://image.gcores.com/8089eecb20a204ce6b157bdeb66e470d-1600-900.jpg?x-oss-process=image/resize,limit_1,m_fill,w_717,h_402/quality,q_90/format,webp',
  47. 'https://image.gcores.com/43969d1c09ed637f48b558ede508c860-1600-900.png?x-oss-process=image/resize,limit_1,m_fill,w_717,h_402/quality,q_90/format,webp'
  48. ])
  49. let dataArr = reactive([
  50. {
  51. title: '《守望先锋》“归来”现已成Steam差评率第一的游戏',
  52. subtile: '我是副标题',
  53. img: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg'
  54. },
  55. {
  56. title: '休闲冒险游戏《美希与猫之岛 -Neko Odyssey-》上线Steam商城页,将于2024年发售',
  57. subtile: '我是副标题',
  58. img: 'https://image.gcores.com/03aed77757653235ab200815b828bf0e-460-215.jpg?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  59. },
  60. {
  61. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  62. subtile: '我是副标题',
  63. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  64. },
  65. {
  66. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  67. subtile: '我是副标题',
  68. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  69. },
  70. {
  71. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  72. subtile: '我是副标题',
  73. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  74. },
  75. {
  76. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  77. subtile: '我是副标题',
  78. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  79. },
  80. {
  81. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  82. subtile: '我是副标题',
  83. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  84. },
  85. {
  86. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  87. subtile: '我是副标题',
  88. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  89. },
  90. {
  91. title: '《守望先锋》“归来”现已实装智械入侵更新,Steam版同步推出',
  92. subtile: '我是副标题',
  93. img: 'https://image.gcores.com/1b695803a90f873b53041abe77790d2e-1887-819.png?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp'
  94. },
  95. ])
  96. let page = ref(1)
  97. function onPageChange(){
  98. //dataArr.length = 0
  99. dataArr .push({
  100. title: '《守望先锋》“归来”现已成Steam差评率第一的游戏',
  101. subtile: '我是副标题',
  102. img: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg'
  103. })
  104. console.log(dataArr)
  105. console.log(dataArr)
  106. }
  107. return {
  108. dataArr,
  109. page,
  110. imgArr,
  111. onPageChange
  112. }
  113. },
  114. }
  115. </script>
  116. <style>
  117. </style>