diff --git a/mock/article.js b/mock/article.js index bc236eb9..7980ac1b 100644 --- a/mock/article.js +++ b/mock/article.js @@ -18,7 +18,7 @@ for (let i = 0; i < count; i++) { forecast: '@float(0, 100, 2, 2)', importance: '@integer(1, 3)', 'type|1': ['CN', 'US', 'JP', 'EU'], - 'status|1': ['published', 'draft', 'deleted'], + 'status|1': ['published', 'draft'], display_time: '@datetime', comment_disabled: true, pageviews: '@integer(300, 5000)', diff --git a/src/views/table/complex-table.vue b/src/views/table/complex-table.vue index f3bf7ac2..295c5fc4 100644 --- a/src/views/table/complex-table.vue +++ b/src/views/table/complex-table.vue @@ -319,8 +319,8 @@ export default { const tempData = Object.assign({}, this.temp) tempData.timestamp = +new Date(tempData.timestamp) // change Thu Nov 30 2017 16:41:05 GMT+0800 (CST) to 1512031311464 updateArticle(tempData).then(() => { - const index = this.list.findIndex(v => v.id === this.temp.id) - this.list.splice(index, 1, this.temp) + const index = this.list.findIndex(v => v.id === this.temp.id) + this.list.splice(index, 1, this.temp) this.dialogFormVisible = false this.$notify({ title: 'Success',