pref: 修改代码使得文章发布时间使用的是实际点击发布的时间 (#160)

pull/182/head
Junyi Ao 2020-05-27 10:15:11 +08:00 committed by GitHub
parent 3785b9354f
commit 5cfe3ea618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -479,6 +479,9 @@ export default {
this.createOrUpdatePost()
},
handlePublishClick() {
if (this.selectedPost.status === 'DRAFT') {
this.selectedPost.createTime = new Date()
}
this.selectedPost.status = 'PUBLISHED'
this.createOrUpdatePost()
},