mirror of https://github.com/halo-dev/halo
pref: 修改代码使得文章发布时间使用的是实际点击发布的时间 (halo-dev/console#160)
parent
e4f6938f0c
commit
f911463cf7
|
@ -479,6 +479,9 @@ export default {
|
||||||
this.createOrUpdatePost()
|
this.createOrUpdatePost()
|
||||||
},
|
},
|
||||||
handlePublishClick() {
|
handlePublishClick() {
|
||||||
|
if (this.selectedPost.status === 'DRAFT') {
|
||||||
|
this.selectedPost.createTime = new Date()
|
||||||
|
}
|
||||||
this.selectedPost.status = 'PUBLISHED'
|
this.selectedPost.status = 'PUBLISHED'
|
||||||
this.createOrUpdatePost()
|
this.createOrUpdatePost()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue