mirror of https://github.com/halo-dev/halo-admin
Close drawer when select attachment.
parent
a28b3e9a9a
commit
47ac79559b
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<a-drawer
|
||||
title="选择附件"
|
||||
:width="isMobile()?'100%':'580'"
|
||||
:width="isMobile()?'100%':drawerWidth"
|
||||
closable
|
||||
:visible="visiable"
|
||||
destroyOnClose
|
||||
|
@ -68,6 +68,11 @@ export default {
|
|||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
drawerWidth: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 580
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
<a-divider/>
|
||||
</div>
|
||||
<AttachmentSelectDrawer v-model="childDrawerVisible" @listenToSelect="selectPostThumb"/>
|
||||
<AttachmentSelectDrawer v-model="childDrawerVisible" @listenToSelect="selectPostThumb" :drawerWidth="460"/>
|
||||
<div class="post-control">
|
||||
<a-button style="marginRight: 8px" @click="handleDraftClick">保存草稿</a-button>
|
||||
<a-button @click="handlePublishClick" type="primary">{{ publishText }}</a-button>
|
||||
|
@ -258,6 +258,7 @@ export default {
|
|||
},
|
||||
selectPostThumb(data) {
|
||||
this.postToStage.thumbnail = data.path
|
||||
this.childDrawerVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,6 +169,7 @@ export default {
|
|||
},
|
||||
selectAvatar(data) {
|
||||
this.user.avatar = data.path
|
||||
this.attachmentDrawerVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue