content.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template name="dever-content">
  2. <view>
  3. <block v-for="(v, k) in item" :key="k">
  4. <view :class="[skeleton ? 'grace-skeletons-img' : 'grace-img-in']" v-if="v.type == 'pic'">
  5. <image :src="v.content" class="grace-art-img" mode="widthFix" @click="Dever.viewPic(pics, v.content)" style="height:auto"></image>
  6. </view>
  7. <view :class="[skeleton ? 'grace-skeletons' : 'grace-art-content']" v-else-if="v.type == 'html'">
  8. <mp-html :content="v.content" ref="article"></mp-html>
  9. </view>
  10. </block>
  11. </view>
  12. </template>
  13. <script>
  14. import mpHtml from "@/lib/mp-html/mp-html.vue";
  15. export default {
  16. props: {
  17. skeleton : {
  18. type : Boolean,
  19. value : false
  20. },
  21. item : {
  22. type : Array,
  23. value : null
  24. },
  25. pics : {
  26. type : Array,
  27. value : null
  28. },
  29. },
  30. methods:{
  31. },
  32. components: {
  33. mpHtml
  34. },
  35. }
  36. </script>
  37. <style>
  38. .grace-art-margin{margin-top:20rpx;}
  39. .grace-art-title{display:block; width:100%; font-size:38rpx; font-weight:bold; line-height:56rpx;}
  40. .grace-skeletons{background-color:#F8F8F8; border-radius:8rpx; height:60rpx;}
  41. .grace-skeletons-img{width:100%; background-color:#F8F8F8; height:300rpx; border-radius:8rpx;}
  42. .grace-art-author{width:700rpx; font-size:0;}
  43. .grace-art-author-face{width:66rpx; height:66rpx; border-radius:66rpx; margin-right:20rpx; flex-shrink:0;}
  44. .grace-art-author-name{display:block; line-height:80rpx; font-size:26rpx;}
  45. .grace-art-btn{width:120rpx; line-height:60rpx; text-align:center; border-radius:50rpx; font-size:26rpx; display:block; flex-shrink:0; margin-left:30rpx;}
  46. .grace-art-info-line{}
  47. .grace-art-info-line-text{font-size:22rpx; line-height:50rpx; color:#888888;}
  48. .grace-art-contents{padding:20rpx 0;}
  49. .grace-art-img{width:100%; margin:10rpx 0;}
  50. .grace-art-content{line-height:52rpx; font-size:26rpx;}
  51. </style>