Commit 092017ee by 温丽香

fixed

1 parent 4f17e150
Pipeline #4817 passed
in 2 minutes 13 seconds
Showing with 6 additions and 2 deletions
...@@ -227,8 +227,12 @@ export default { ...@@ -227,8 +227,12 @@ export default {
} }
const tableData = [] const tableData = []
for (const value of this.baseData) { for (const value of this.baseData) {
if (value.type === 'object') {
tableData.push({ ...value, emit: true, level: 0 })
} else {
tableData.push({ ...value, level: 0 }) tableData.push({ ...value, level: 0 })
} }
}
for (const value of this.currentData) { for (const value of this.currentData) {
tableData.push({ ...value, emit: true, level: 1 }) tableData.push({ ...value, emit: true, level: 1 })
} }
...@@ -254,7 +258,7 @@ export default { ...@@ -254,7 +258,7 @@ export default {
}, },
handleDelete(index, row) { handleDelete(index, row) {
if (!row.emit) { if (!row.emit) {
this.tableData[index] = { ...row, type: 'null', value: null, emit: true, restore: true } this.tableData[index] = { ...row, type: 'object', value: null, emit: true, restore: true }
} else { } else {
this.tableData.splice(index, 1) this.tableData.splice(index, 1)
} }
...@@ -270,7 +274,7 @@ export default { ...@@ -270,7 +274,7 @@ export default {
tableData.push(tableDataTemp[i]) tableData.push(tableDataTemp[i])
} }
} }
const scalarsArr = tableData.filter(item => item.type === 'string' || item.type === 'number' || item.type === 'null') const scalarsArr = tableData.filter(item => item.type === 'string' || item.type === 'number' || item.type === 'object')
const binaryArr = tableData.filter(item => item.type === 'blob') const binaryArr = tableData.filter(item => item.type === 'blob')
const tableArr = tableData.filter(item => item.type === 'table') const tableArr = tableData.filter(item => item.type === 'table')
const scalarsObj = {} const scalarsObj = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!