Attachment detail info.

pull/9/head
ruibaby 6 years ago
parent 04ec088db6
commit 29df46aee0

@ -47,7 +47,7 @@
</a-modal> </a-modal>
<a-drawer <a-drawer
v-if="selectAttachment" v-if="selectAttachment"
title="图片详情" title="附件详情"
:width="drawerWidth" :width="drawerWidth"
closable closable
:visible="drawerVisible" :visible="drawerVisible"
@ -55,14 +55,40 @@
@close="onChildClose" @close="onChildClose"
> >
<a-row type="flex" align="middle"> <a-row type="flex" align="middle">
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col :span="24">
<a-skeleton active :loading="detailImgLoading" :paragraph="{rows: 8}"> <a-skeleton active :loading="detailImgLoading" :paragraph="{rows: 8}">
<div class="attach-detail-img"> <div class="attach-detail-img">
<img :src="selectAttachment.path"> <img :src="selectAttachment.path">
</div> </div>
</a-skeleton> </a-skeleton>
</a-col> </a-col>
<a-divider/>
<a-col :span="24">
<a-list itemLayout="horizontal">
<a-list-item>
<a-list-item-meta :description="selectAttachment.name">
<span slot="title">附件名</span>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item-meta :description="selectAttachment.mediaType">
<span slot="title">附件类型</span>
</a-list-item-meta>
</a-list-item>
</a-list>
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="普通链接" key="1">
{{ selectAttachment.path }}
</a-tab-pane>
<a-tab-pane tab="Markdown 格式" key="3">
![{{ selectAttachment.name }}]({{selectAttachment.path}})
</a-tab-pane>
</a-tabs>
</a-col>
</a-row> </a-row>
<div class="attachment-control">
<a-button type="danger">删除</a-button>
</div>
</a-drawer> </a-drawer>
</page-view> </page-view>
</template> </template>
@ -140,6 +166,10 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-divider-horizontal{
margin: 24px 0 12px 0;
}
.attachment-item { .attachment-item {
padding-bottom: 12px; padding-bottom: 12px;
} }
@ -172,4 +202,16 @@ export default {
.attach-detail-img img { .attach-detail-img img {
width: 100%; width: 100%;
} }
.attachment-control {
position: absolute;
bottom: 0px;
width: 100%;
border-top: 1px solid rgb(232, 232, 232);
padding: 10px 16px;
text-align: right;
left: 0px;
background: rgb(255, 255, 255);
border-radius: 0px 0px 4px 4px;
}
</style> </style>

@ -108,7 +108,7 @@
@close="onChildClose" @close="onChildClose"
> >
</a-drawer> </a-drawer>
<div class="postControl"> <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>
</div> </div>
@ -279,7 +279,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
.postControl { .post-control {
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
width: 100%; width: 100%;

Loading…
Cancel
Save