mirror of https://github.com/halo-dev/halo-admin
pref: 修改代码使得文章发布时间使用的是实际点击发布的时间 (#160)
parent
3785b9354f
commit
5cfe3ea618
|
@ -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