|
|
@@ -111,7 +111,7 @@
|
|
|
<view class="box2-detail" v-if="activityInfo&&activityInfo.activityDetails">
|
|
|
<up-read-more :toggle="true" showHeight="374rpx" :shadowStyle="shadowStyle" color="#989998" fontSize="24rpx" openText="收起" closeText="展开" ref="uReadMore">
|
|
|
<!-- <rich-text :nodes="activityInfo.activityDetails"></rich-text> -->
|
|
|
- <u-parse :content="activityInfo.activityDetails" @load="load"></u-parse>
|
|
|
+ <u-parse :content="activityInfo.activityDetails" :tagStyle="parseTagStyle" @load="load"></u-parse>
|
|
|
</up-read-more>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -258,6 +258,20 @@
|
|
|
paddingTop: "0",
|
|
|
marginTop: "20rpx"
|
|
|
})
|
|
|
+ // u-parse 内部走 <rich-text>,有样式隔离黑盒,外部 class 无法穿透。
|
|
|
+ // 这里给常见标签注入默认内联样式,补齐后端 rich-text 默认不带 padding/字号/列表风格等基础视觉效果。
|
|
|
+ const parseTagStyle = ref({
|
|
|
+ p: 'text-indent: 0; line-height: 1.6; margin: 8px 0; font-size: 28rpx;',
|
|
|
+ h1: 'font-size: 36rpx; font-weight: bold; margin: 16px 0 8px;',
|
|
|
+ h2: 'font-size: 32rpx; font-weight: bold; margin: 14px 0 8px;',
|
|
|
+ h3: 'font-size: 30rpx; font-weight: bold; margin: 12px 0 6px;',
|
|
|
+ strong: 'font-weight: bold;',
|
|
|
+ em: 'font-style: italic;',
|
|
|
+ u: 'text-decoration: underline;',
|
|
|
+ blockquote: 'border-left: 6rpx solid #ddd; padding-left: 16rpx; color: #666; margin: 8px 0;',
|
|
|
+ img: 'max-width: 100%; height: auto;',
|
|
|
+ li: 'list-style-position: inside;'
|
|
|
+ })
|
|
|
|
|
|
// --- 海报生成相关 ---
|
|
|
const posterShow = ref(false) // 控制海报弹窗显示
|