From 69b2ad828780c15fd9a86c5e9d1014327644f558 Mon Sep 17 00:00:00 2001 From: Rokita <35868425+Ruukita@users.noreply.github.com> Date: Sun, 3 May 2020 09:06:17 +0800 Subject: [PATCH 1/4] Finish rename function --- src/api/static.js | 11 ++++ .../system/developer/tabs/StaticStorage.vue | 65 ++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/src/api/static.js b/src/api/static.js index 648392059..911a62386 100644 --- a/src/api/static.js +++ b/src/api/static.js @@ -46,4 +46,15 @@ staticApi.upload = (formData, uploadProgress, cancelToken, basePath) => { }) } +staticApi.rename = (basePath, newName) => { + return service({ + url: `${baseUrl}/rename`, + params: { + basePath: basePath, + newName: newName + }, + method: 'post' + }) +} + export default staticApi diff --git a/src/views/system/developer/tabs/StaticStorage.vue b/src/views/system/developer/tabs/StaticStorage.vue index fadfbfacd..b5c26daa7 100644 --- a/src/views/system/developer/tabs/StaticStorage.vue +++ b/src/views/system/developer/tabs/StaticStorage.vue @@ -91,6 +91,14 @@ 删除 + + 重命名 + @@ -132,9 +140,32 @@ + + + + + + + +