Commit 27431299 by hank

fix bug

parent 97d5d6ad
......@@ -108,7 +108,6 @@
</template>
<script>
import { updateArticle } from '@/api/article'
import { addKey, getValueList } from '@/api/common'
import waves from '@/directive/waves' // waves directive
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
......@@ -282,14 +281,8 @@ export default {
if (valid) {
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(() => {
for (const v of this.list) {
if (v.id === this.temp.id) {
const index = this.list.indexOf(v)
this.list.splice(index, 1, this.temp)
break
}
}
addKey(tempData).then(() => {
this.getList()
this.dialogFormVisible = false
this.$notify({
title: 'Success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment