You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
9 months ago
|
<template>
|
||
|
<view class='richText' :style="'background-color:'+bgColor+';margin:'+ udConfig +'rpx '+ lrConfig +'rpx;'" v-if="description">
|
||
|
<!-- <view>大法官好地方规划的法规</view> -->
|
||
|
<!-- #ifndef APP-PLUS -->
|
||
|
<jyf-parser :domain='domain' :html="description.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||
|
<!-- #endif -->
|
||
|
<!-- #ifdef APP-PLUS -->
|
||
|
<view class="description" v-html="description"></view>
|
||
|
<!-- #endif -->
|
||
|
</view>
|
||
|
</template>
|
||
|
<script>
|
||
|
import parser from "@/components/jyf-parser/jyf-parser";
|
||
|
import { HTTP_REQUEST_URL } from '@/config/app';
|
||
|
export default {
|
||
|
name: 'richText',
|
||
|
props: {
|
||
|
dataConfig: {
|
||
|
type: Object,
|
||
|
default: () => {}
|
||
|
}
|
||
|
},
|
||
|
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 * 2,
|
||
|
domain: HTTP_REQUEST_URL,
|
||
|
};
|
||
|
},
|
||
|
created() {},
|
||
|
methods: {}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.richText{
|
||
|
padding: 20rpx;
|
||
|
background-color: #fff;
|
||
|
margin: 0 20rpx;
|
||
|
}
|
||
|
</style>
|