refactor(视图): 富文本视图如果未定义字段显示'无法获取字段'定义字段但没有值则不显示

This commit is contained in:
wangjiahao 2022-08-25 16:50:27 +08:00
parent 634530411e
commit 864c6e42fd

View File

@ -148,7 +148,7 @@ export default {
if (on) {
on.forEach(itm => {
const ele = itm.slice(1, -1)
content = content.replace(itm, _this.dataRowNameSelect[ele] ? _this.dataRowNameSelect[ele] : '[无法获取字段值]')
content = content.replace(itm, _this.dataRowNameSelect[ele] !== undefined ? _this.dataRowNameSelect[ele] : '[无法获取字段值]')
})
}
content = content.replace('class="base-selected"','')