| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view v-show="!isSortType">
- <view class='richText' :style="'background-color:'+bgColor+';margin:'+ udConfig +'rpx '+ lrConfig +'rpx;'" v-if="description">
- <jyf-parser :content="description" ref="article" :tag-style="tagStyle"></jyf-parser>
- </view>
- </view>
- </template>
- <script>
- import parser from "@/components/mp-html/mp-html";
- export default {
- name: 'richText',
- props: {
- dataConfig: {
- type: Object,
- default: () => {}
- },
- isSortType:{
- type: String | Number,
- default:0
- }
- },
- components: {
- "jyf-parser": parser
- },
- data() {
- return {
- tagStyle: {
- img: 'width:100%;'
- },
- bgColor:this.dataConfig.bgColor.color[0].item,
- lrConfig:this.dataConfig.lrConfig.val,
- description:this.dataConfig.richText.val,
- udConfig:this.dataConfig.udConfig.val
- };
- },
- created() {},
- methods: {
-
- }
- }
- </script>
- <style lang="scss">
- .richText{
- padding: 20rpx;
- background-color: #fff;
- margin: 0 20rpx;
- border-radius: 24rpx;
- }
- /deep/uni-video{
- width: 100%!important;
- }
- /deep/video{
- width: 100%!important;
- }
- </style>
|