修改bug

This commit is contained in:
zhouyanli
2026-07-30 18:01:39 +08:00
parent 80ff7588b1
commit 8c0a713512
20 changed files with 223 additions and 134 deletions

View File

@@ -96,7 +96,7 @@
<!-- 活动详情 -->
<view class="section" style="margin-bottom: 40rpx;">
<view class="section-title">活动详情</view>
<view class="section-content">
<view class="section-content rich-content">
<view v-html="activityConent.content"></view>
<view></view>
</view>
@@ -584,6 +584,8 @@ const showToastMessage = (message) => {
font-weight: 500;
line-height: 1.4;
text-align: right;
white-space: pre-wrap;
word-break: break-all;
}
/* 区块样式 */
@@ -604,8 +606,11 @@ const showToastMessage = (message) => {
.section-content {
font-size: 28rpx;
white-space: pre-wrap;
word-break: break-all;
color: #666;
line-height: 1.6;
overflow-x: hidden;
}
.section-content view {
@@ -909,4 +914,25 @@ const showToastMessage = (message) => {
margin: 0 auto;
}
}
</style>
<style lang="scss">
/* 富文本v-html内图片自适应 — 非 scoped否则穿透不到 v-html 内容 */
.section-content {
img {
max-width: 100% !important;
height: auto !important;
display: block;
}
}
.rich-content {
white-space: normal !important;
word-break: normal !important;
overflow: hidden;
/* 富文本内嵌的所有元素不超出容器 */
* {
max-width: 100% !important;
box-sizing: border-box !important;
}
}
</style>