From e03fc86b44c06ed85215628f56c2f15de36b0516 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 20 Apr 2019 15:46:07 +0800 Subject: [PATCH] Complete select attachment component. --- .../attachment/components/AttachmentSelectDrawer.vue | 8 ++++---- src/views/user/Profile.vue | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index a8ed5860..1223dae2 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -15,7 +15,7 @@ -
+
@@ -72,8 +72,6 @@ export default { }, data() { return { - detailVisiable: false, - attachmentDrawerVisible: false, uploadVisible: false, skeletonLoading: true, pagination: { @@ -82,7 +80,6 @@ export default { sort: '' }, attachments: [], - selectedAttachment: {}, attachmentUploadHandler: attachmentApi.upload } }, @@ -115,6 +112,9 @@ export default { this.pagination.total = response.data.data.total }) }, + selectAttachment(item) { + this.$emit('listenToSelect', item) + }, handlePaginationChange(page, pageSize) { this.pagination.page = page this.pagination.size = pageSize diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index b66dd6e0..7b22392b 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -97,7 +97,7 @@ - +
@@ -120,7 +120,8 @@ export default { oldPassword: null, newPassword: null, confirmPassword: null - } + }, + attachment: {} } }, computed: { @@ -162,6 +163,9 @@ export default { this.user = response.data.data this.$message.success('资料更新成功!') }) + }, + selectAvatar(data) { + this.user.avatar = data.path } } }