perf: 优化错误显示

This commit is contained in:
ibuler 2023-04-18 19:08:17 +08:00
parent fa405f4cce
commit 32f708a014
2 changed files with 5 additions and 3 deletions

View File

@ -285,7 +285,9 @@ export default {
const data = []
// eslint-disable-next-line prefer-const
for (let [key, value] of Object.entries(errorData)) {
if (typeof value === 'object') {
if (Array.isArray(value)) {
value = JSON.stringify(value)
} else if (typeof value === 'object') {
value = this.beautifyErrorData(value)
}
let label = this.tableColumnNameMapper[key]

View File

@ -63,9 +63,9 @@ export default {
this.inEditMode = true
},
getCellValue(val) {
let v
let v = ''
if (val && typeof val === 'object') {
v = val['name'] || val['display_name'] || ''
v = val['name'] || val['display_name'] || JSON.stringify(val)
}
return v || val
},