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

Loading…
Cancel
Save