Skip to content

Commit

Permalink
Fixed some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gudaoxuri committed Dec 1, 2023
1 parent 63dacee commit 5c56dd3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions docs/TableDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ const events = {
else {
// Update
resp2.forEach((resp) => {
const storageRecord = resp.records.find(record => record.no === data[0].no)
if (storageRecord) {
let newRecords = JSON.parse(JSON.stringify(storageRecord))
newRecords = {
...newRecords,
...data[0],
}
resolve(attachDict([newRecords]))
}
const newRecords = data.map(d => [d, resp.records.find(record => record.no === d.no)])
.filter(d => d[1] !== undefined)
.map((d) => {
return {
...JSON.parse(JSON.stringify(d[1])),
...d[0],
}
})
if (newRecords)
resolve(attachDict(newRecords))
})
}
}, 100)
Expand Down Expand Up @@ -341,7 +342,7 @@ const resp2 = [
</script>

<template>
<div style="height: 400px">
<div style="height: 600px">
<!-- <iw-task-table pk-column-name="no" :columns="columns" :events="events" :layouts="layouts"></iw-task-table> -->
<iw-task-table
pk-column-name="no" :columns="columns" :events="events" :layouts="layouts"
Expand Down

0 comments on commit 5c56dd3

Please sign in to comment.