From a5ee51938284d6dc471e0a06828d259b904016f6 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 20 Apr 2019 12:27:25 +0800 Subject: [PATCH] Support attachment update method. --- src/api/attachment.js | 8 +++ src/views/attachment/AttachmentList.vue | 3 +- .../components/AttachmentDetailDrawer.vue | 61 +++++-------------- 3 files changed, 25 insertions(+), 47 deletions(-) diff --git a/src/api/attachment.js b/src/api/attachment.js index 6d40ba6a..369a2964 100644 --- a/src/api/attachment.js +++ b/src/api/attachment.js @@ -27,6 +27,14 @@ attachmentApi.delete = attachmentId => { }) } +attachmentApi.update = (attachmentId, attachment) => { + return service({ + url: `${baseUrl}/${attachmentId}`, + method: 'put', + data: attachment + }) +} + attachmentApi.CancelToken = axios.CancelToken attachmentApi.isCancel = axios.isCancel diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index 61b3a8ac..3d89c57b 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -41,6 +41,7 @@ + { diff --git a/src/views/attachment/components/AttachmentDetailDrawer.vue b/src/views/attachment/components/AttachmentDetailDrawer.vue index ed511fd0..c581df3f 100644 --- a/src/views/attachment/components/AttachmentDetailDrawer.vue +++ b/src/views/attachment/components/AttachmentDetailDrawer.vue @@ -7,50 +7,27 @@ destroyOnClose @close="onClose" > - + - +
- + - + -