From 5f34b6f542e5a0b9ed16b25b799aca5482331cc0 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 10 Apr 2019 19:14:25 +0800 Subject: [PATCH] Refactor ThemeList.vue --- src/api/theme.js | 11 +- src/views/interface/ThemeList.vue | 120 ++- yarn.lock | 1183 +++++++++++++++-------------- 3 files changed, 674 insertions(+), 640 deletions(-) diff --git a/src/api/theme.js b/src/api/theme.js index 3b1e2e0c2..ca6d14805 100644 --- a/src/api/theme.js +++ b/src/api/theme.js @@ -46,9 +46,9 @@ themeApi.delete = key => { }) } -themeApi.fetchConfiguration = () => { +themeApi.fetchConfiguration = themeId => { return service({ - url: `${baseUrl}/activation/configurations`, + url: `${baseUrl}/${themeId}/configurations`, method: 'get' }) } @@ -68,4 +68,11 @@ themeApi.saveSettings = settings => { }) } +themeApi.getProperty = themeId => { + return service({ + url: `${baseUrl}/${themeId}`, + method: 'get' + }) +} + export default themeApi diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index c32516141..9df63d0ef 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -1,10 +1,6 @@