Skip to content

Commit 06e50a8

Browse files
committed
refine code
1 parent c628f45 commit 06e50a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/views/example/table.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152

153153
<script>
154154
import { fetchList, fetchPv } from 'api/article_table';
155-
import { parseTime, objectMerge } from 'utils';
155+
import { parseTime } from 'utils';
156156
157157
const calendarTypeOptions = [
158158
{ key: 'FD', display_name: '经济数据' },
@@ -265,7 +265,7 @@
265265
this.dialogFormVisible = true;
266266
},
267267
handleUpdate(row) {
268-
objectMerge(this.temp, row)
268+
this.temp = Object.assign({}, row);
269269
this.dialogStatus = 'update';
270270
this.dialogFormVisible = true;
271271
},
@@ -296,7 +296,8 @@
296296
this.temp.timestamp = +this.temp.timestamp;
297297
for (const v of this.list) {
298298
if (v.id === this.temp.id) {
299-
objectMerge(v, this.temp);
299+
const index = this.list.indexOf(v);
300+
this.list.splice(index, 1, this.temp);
300301
break;
301302
}
302303
}

0 commit comments

Comments
 (0)