選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

textDetails.vue 1.4KB

9ヶ月前
1年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="news-item" v-for="(item,index) in state.data" :key='index'>
  3. <view class="left-text">
  4. <view class="tit description">{{item.title}}</view>
  5. <view class="span">{{item.copywriting}}</view>
  6. </view>
  7. <view class="image-box">
  8. <image :src="fileURLList + item.imgUrl"></image>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup lang="ts">
  13. import { reactive } from "vue";
  14. import { onLoad } from "@dcloudio/uni-app";
  15. import { fileURL, fileURLList } from "@/datas/fileURL.js";
  16. const state = reactive({
  17. data: []
  18. })
  19. onLoad((option) => {
  20. console.log("option",option)
  21. const params = JSON.parse(decodeURIComponent(option.item))
  22. state.data.push(params)
  23. console.log("params", params)
  24. })
  25. </script>
  26. <style>
  27. page {
  28. background: #eef7f7;
  29. }
  30. </style>
  31. <style lang="scss" scoped>
  32. .news-item {
  33. display: flex;
  34. border: 1rpx solid #dcdcdc;
  35. padding: 40rpx;
  36. font-size: 30rpx;
  37. box-sizing: border-box;
  38. width: 90%;
  39. margin: 30rpx auto;
  40. background-color: white;
  41. justify-content: space-between;
  42. }
  43. .image-box image {
  44. width: 100rpx;
  45. height: 100rpx;
  46. border-radius: 10rpx;
  47. }
  48. .news-item .span {
  49. font-size: 22rpx;
  50. display: inline-block;
  51. text-align: center;
  52. background: #bae0f1;
  53. border-radius: 6rpx;
  54. color: #0a8f8a;
  55. padding: 4rpx 8rpx;
  56. }
  57. .news-item .more {
  58. font-size: 24rpx;
  59. text-align: center;
  60. color: #0a8f8a;
  61. padding: 22rpx 0;
  62. }
  63. </style>