content.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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'"><rich-text type="text" :nodes="v.content"></rich-text></view>
  8. </block>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name: "dever-content",
  14. props: {
  15. skeleton : {
  16. type : Boolean,
  17. value : false
  18. },
  19. item : {
  20. type : Array,
  21. value : null
  22. },
  23. pics : {
  24. type : Array,
  25. value : null
  26. },
  27. },
  28. methods:{
  29. },
  30. }
  31. </script>
  32. <style>
  33. .grace-art-margin{margin-top:20rpx;}
  34. .grace-art-title{display:block; width:100%; font-size:38rpx; font-weight:bold; line-height:56rpx;}
  35. .grace-skeletons{background-color:#F8F8F8; border-radius:8rpx; height:60rpx;}
  36. .grace-skeletons-img{width:100%; background-color:#F8F8F8; height:300rpx; border-radius:8rpx;}
  37. .grace-art-author{width:700rpx; font-size:0;}
  38. .grace-art-author-face{width:66rpx; height:66rpx; border-radius:66rpx; margin-right:20rpx; flex-shrink:0;}
  39. .grace-art-author-name{display:block; line-height:80rpx; font-size:26rpx;}
  40. .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;}
  41. .grace-art-info-line{}
  42. .grace-art-info-line-text{font-size:22rpx; line-height:50rpx; color:#888888;}
  43. .grace-art-contents{padding:20rpx 0;}
  44. .grace-art-img{width:100%; margin:10rpx 0;}
  45. .grace-art-content{line-height:52rpx; font-size:28rpx;}
  46. </style>