Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
pref: 修改代码使得文章发布时间使用的是实际点击发布的时间 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajyy authored May 27, 2020
1 parent 3785b93 commit 5cfe3ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/views/post/components/PostSettingDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
Expand Down

0 comments on commit 5cfe3ea

Please sign in to comment.