fix: initial value of topPriority in post settings (#530)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/531/head
Ryan Wang 3 years ago committed by GitHub
parent 570b9d8c19
commit 812daa2eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -215,9 +215,7 @@ export default {
return {
postStatuses,
form: {
model: {
topPriority: 0
},
model: {},
saving: false,
saveErrored: false,
draftSaving: false,
@ -254,10 +252,13 @@ export default {
},
topPriority: {
get() {
if (this.form.model.topPriority === undefined) {
return false
}
return this.form.model.topPriority !== 0
},
set(value) {
this.form.model.topPriority = value ? 1 : 0
this.$set(this.form.model, 'topPriority', value ? 1 : 0)
}
},
fullPath() {

Loading…
Cancel
Save