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