richText.vue 518 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <view>
  3. <view class="diy-richText" :style="{background: itemData.style.background, padding: itemData.style.paddingTop + 'px ' + itemData.style.paddingLeft + 'px'}"
  4. v-html="formatContent(itemData.params.content)">
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import utils from '@/common/utils.js';
  10. export default {
  11. data() {
  12. return {
  13. }
  14. },
  15. props:['itemData'],
  16. created(){
  17. },
  18. methods: {
  19. formatContent(e){
  20. return utils.format_content(e);
  21. }
  22. }
  23. }
  24. </script>
  25. <style>
  26. </style>