perf(notice): 优化通知详情,友好显示富文本内容

This commit is contained in:
KingMo 2022-08-16 21:00:51 +08:00
parent 3557665732
commit 3a7720c481
2 changed files with 5 additions and 6 deletions

View File

@ -48,9 +48,8 @@
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="公告内容" namespace="noticeDetail"></vc:i18n></span></label>
<div class="col-sm-10 ">
<textarea v-model="noticeDetailInfo.context" cols="3" type="text" readonly
class="form-control"></textarea>
<div class="col-sm-10">
<div style="margin-top: 10px" v-html="noticeDetailInfo.context"></div>
</div>
</div>
</div>

View File

@ -45,9 +45,9 @@
if (_notices.length > 0) {
//filterXSS
_notices[0].context = filterXSS(_notices[0].context);
if (_notices[0].context != null && _notices[0].context != '' && _notices[0].context != 'undefined') {
/*if (_notices[0].context != null && _notices[0].context != '' && _notices[0].context != 'undefined') {
_notices[0].context = _notices[0].context.substring(3).split("</p>")[0];
}
}*/
vc.copyObject(_notices[0], vc.component.noticeDetailInfo);
}
},
@ -61,4 +61,4 @@
}
}
});
})(window.vc);
})(window.vc);