page2.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <v-container>
  3. <v-row justify="center">
  4. <v-col cols="12" lg="8">
  5. <v-card class="mx-auto" variant="tonal">
  6. <v-card>
  7. <v-img :src="imgSrc" cover></v-img>
  8. </v-card>
  9. <br><br>
  10. <v-card-item>
  11. <v-card-title>
  12. <p style="font-size: 30px;
  13. text-align: left;
  14. word-break: break-all;">《星露谷物语》官方食谱书2024年4月16日发售</p>
  15. </v-card-title>
  16. <br>
  17. <v-card-subtitle>
  18. <p style="font-size: 18px;text-align: left;">收录50种以上食谱</p>
  19. </v-card-subtitle>
  20. </v-card-item>
  21. <v-card-actions>
  22. <v-list-item class="w-100">
  23. <template v-slot:prepend>
  24. <v-avatar color="grey-darken-3"
  25. image="https://avataaars.io/?avatarStyle=Transparent&topType=ShortHairShortCurly&accessoriesType=Prescription02&hairColor=Black&facialHairType=Blank&clotheType=Hoodie&clotheColor=White&eyeType=Default&eyebrowType=DefaultNatural&mouthType=Default&skinColor=Light"></v-avatar>
  26. </template>
  27. <v-list-item-title style="font-size: 15px;text-align: left;">羊星亮</v-list-item-title>
  28. <v-list-item-subtitle style="font-size: 10px;text-align: left;">3天前发布</v-list-item-subtitle>
  29. </v-list-item>
  30. </v-card-actions>
  31. <v-card-text>
  32. <v-md-preview :text="text"></v-md-preview>
  33. </v-card-text>
  34. </v-card>
  35. </v-col>
  36. </v-row>
  37. </v-container>
  38. </template>
  39. <script>
  40. import {ref,onMounted} from 'vue'
  41. export default {
  42. setup() {
  43. let text = ref()
  44. let imgSrc = ref('https://image.gcores.com/ced586d33dc9ab574ae8f769adece3ed-616-353.jpg?x-oss-process=image/resize,limit_1,m_lfit,w_1200/quality,q_90/format,webp')
  45. onMounted(async () => {
  46. text.value = await(await fetch('https://bitbucket.org/tutorials/markdowndemo/raw/5b6c39df3196eeeb8a36684beb9a3df854a0b5f3/README.md')).text()
  47. console.log(text.value)
  48. });
  49. return {text,
  50. imgSrc};
  51. }
  52. };
  53. </script>