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

pull/3445/head
Junyi Ao 2020-05-27 10:15:11 +08:00 committed by GitHub
parent e4f6938f0c
commit f911463cf7
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()
},