mirror of https://github.com/halo-dev/halo
Refactor PostSetting.vue.
parent
357cd7cee9
commit
ab6b070d93
|
@ -31,10 +31,31 @@
|
||||||
<a-input v-model="selectedPost.url" />
|
<a-input v-model="selectedPost.url" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="访问密码:">
|
<a-form-item label="访问密码:">
|
||||||
|
<a-input
|
||||||
|
v-model="selectedPost.password"
|
||||||
|
v-if="passwordVisible"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="javascript:void(0);"
|
||||||
|
slot="addonAfter"
|
||||||
|
@click="togglePasswordVisible"
|
||||||
|
>
|
||||||
|
<a-icon type="eye" />
|
||||||
|
</a>
|
||||||
|
</a-input>
|
||||||
<a-input
|
<a-input
|
||||||
type="password"
|
type="password"
|
||||||
v-model="selectedPost.password"
|
v-model="selectedPost.password"
|
||||||
/>
|
v-else
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="javascript:void(0);"
|
||||||
|
slot="addonAfter"
|
||||||
|
@click="togglePasswordVisible"
|
||||||
|
>
|
||||||
|
<a-icon type="eye-invisible" />
|
||||||
|
</a>
|
||||||
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="发表时间:">
|
<a-form-item label="发表时间:">
|
||||||
|
@ -218,6 +239,7 @@ export default {
|
||||||
thumbDrawerVisible: false,
|
thumbDrawerVisible: false,
|
||||||
categoryFormVisible: false,
|
categoryFormVisible: false,
|
||||||
settingLoading: true,
|
settingLoading: true,
|
||||||
|
passwordVisible: false,
|
||||||
selectedPost: this.post,
|
selectedPost: this.post,
|
||||||
selectedTagIds: this.tagIds,
|
selectedTagIds: this.tagIds,
|
||||||
selectedCategoryIds: this.categoryIds,
|
selectedCategoryIds: this.categoryIds,
|
||||||
|
@ -395,8 +417,12 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
togglePasswordVisible() {
|
||||||
|
this.passwordVisible = !this.passwordVisible
|
||||||
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.$emit('close', false)
|
this.$emit('close', false)
|
||||||
|
this.passwordVisible = false
|
||||||
},
|
},
|
||||||
onPostDateChange(value, dateString) {
|
onPostDateChange(value, dateString) {
|
||||||
this.selectedPost.createTime = value.valueOf()
|
this.selectedPost.createTime = value.valueOf()
|
||||||
|
|
Loading…
Reference in New Issue