Browse Source

新闻详情-富文本内容异常空格时排版错乱问题修复

通知公告-排版问题修复
feature/style
liushaowen 5 years ago
parent
commit
9d54dd4865
  1. 1
      epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.wxss
  2. 7
      epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxss
  3. 2
      epdc-resident-mp-yushan/utils/util.js

1
epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.wxss

@ -24,6 +24,7 @@
line-height: 68rpx;
color: #333333;
padding-top: 40rpx;
word-break: break-all;
}
.detail-subtitle {
display: flex;

7
epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxss

@ -1,6 +1,11 @@
page {
width: 100%;
height: auto;
overflow-y: auto;
background: #f7f7f7;
}
.notice {
width: 100%;
height: 100vh;
background: #f7f7f7;
}
.nav {

2
epdc-resident-mp-yushan/utils/util.js

@ -15,7 +15,7 @@ const formatNumber = n => {
}
const formatRichText = html => {
let newContent= html.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;"');
let newContent= html.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;"').replace(/\<div style=\"/gi,'<div style="width:100%;word-break:break-all;word-wrap:normal;').replace(/\s{2,}/g,"")
return newContent
}

Loading…
Cancel
Save