richTextTemplate.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="content">
  3. <mp-html :content="html" :tag-style="tagStyle" />
  4. <!-- <parser :html="html" :img-mode="widthFix"></parser> -->
  5. </view>
  6. </template>
  7. <script>
  8. import parser from '@/components/jyf-Parser/index'
  9. var self
  10. export default{
  11. components: {
  12. parser,
  13. // uPars
  14. },
  15. data() {
  16. return{
  17. serverUrl: '',
  18. type: '',
  19. html:'',
  20. tagStyle:{
  21. div:'line-height: 58rpx;margin-bottom: 10rpx;font-size: 28rpx;',
  22. h4:'line-height: 54rpx;font-size: 30rpx;color:#666666;',
  23. h3:'line-height: 54rpx;font-size: 30rpx;color:#666666;',
  24. h2:'line-height: 54rpx;font-size: 30rpx;color:#666666;',
  25. p:'line-height: 50rpx;font-size: 30rpx;color:#666666;',
  26. a:'line-height: 50rpx;font-size: 30rpx;color:#666666;',
  27. span:'line-height: 50rpx;font-size: 30rpx;color:#666666;',
  28. img:'width: 100%;height: auto;'
  29. }
  30. }
  31. },
  32. created(){
  33. self = this
  34. },
  35. methods:{
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. page{
  41. background: #FFFFFF;
  42. border-top: 1px solid #EBEBEB;
  43. }
  44. .content {
  45. padding: 40rpx 24rpx;
  46. }
  47. </style>