提交 bef62c19 编写于 作者: G Guillaume Chau

fix(data field): display all white spaces and carriage returns, closes #958

上级 6d4c9db7
......@@ -341,7 +341,7 @@ export default {
},
formattedValue () {
const value = this.field.value
let value = this.field.value
let result
if (this.fieldOptions.abstract) {
return ''
......@@ -358,13 +358,14 @@ export default {
} else if (typeof value === 'string') {
var typeMatch = value.match(rawTypeRE)
if (typeMatch) {
return escape(typeMatch[1])
value = escape(typeMatch[1])
} else {
return `<span>"</span>${escape(value)}<span>"</span>`
value = `<span>"</span>${escape(value)}<span>"</span>`
}
} else {
return value
value = value.replace(/ /g, '&nbsp;')
.replace(/\n/g, '<span>\\n</span>')
}
return value
},
rawValue () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册