refactor: remove the button to remove the thumbnail from the post settings (halo-dev/console#427)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/3445/head
Ryan Wang 2022-01-28 21:29:45 +08:00 committed by GitHub
parent 91b5fc1035
commit cc9eace7b5
2 changed files with 13 additions and 6 deletions

View File

@ -88,8 +88,11 @@
class="img" class="img"
@click="attachmentSelectVisible = true" @click="attachmentSelectVisible = true"
/> />
<a-input v-model="form.model.thumbnail" placeholder="点击封面图选择图片,或者输入外部链接"></a-input> <a-input
<a-button type="dashed" @click="form.model.thumbnail = null">移除</a-button> v-model="form.model.thumbnail"
allow-clear
placeholder="点击封面图选择图片,或者输入外部链接"
></a-input>
</a-space> </a-space>
</div> </div>
</a-form-item> </a-form-item>
@ -122,7 +125,7 @@
</div> </div>
<template slot="footer"> <template slot="footer">
<slot name="extraFooter" /> <slot name="extraFooter" />
<a-button :disabled="loading" @click="modalVisible = false"> 关闭 </a-button> <a-button :disabled="loading" @click="modalVisible = false"> 关闭</a-button>
<ReactiveButton <ReactiveButton
v-if="!form.model.id" v-if="!form.model.id"
:errored="form.draftSaveErrored" :errored="form.draftSaveErrored"

View File

@ -76,8 +76,11 @@
class="img" class="img"
@click="attachmentSelectVisible = true" @click="attachmentSelectVisible = true"
/> />
<a-input v-model="form.model.thumbnail" placeholder="点击封面图选择图片,或者输入外部链接"></a-input> <a-input
<a-button type="dashed" @click="form.model.thumbnail = null">移除</a-button> v-model="form.model.thumbnail"
allow-clear
placeholder="点击封面图选择图片,或者输入外部链接"
></a-input>
</a-space> </a-space>
</div> </div>
</a-form-item> </a-form-item>
@ -110,7 +113,7 @@
</div> </div>
<template slot="footer"> <template slot="footer">
<slot name="extraFooter" /> <slot name="extraFooter" />
<a-button :disabled="loading" @click="modalVisible = false"> 关闭 </a-button> <a-button :disabled="loading" @click="modalVisible = false"> 关闭</a-button>
<ReactiveButton <ReactiveButton
v-if="!form.model.id" v-if="!form.model.id"
:errored="form.draftSaveErrored" :errored="form.draftSaveErrored"
@ -149,6 +152,7 @@ import pinyin from 'tiny-pinyin'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
// apis // apis
import apiClient from '@/utils/api-client' import apiClient from '@/utils/api-client'
export default { export default {
name: 'SheetSettingModal', name: 'SheetSettingModal',
mixins: [mixin, mixinDevice], mixins: [mixin, mixinDevice],