From 9814053d0e4353548e1a2207826f25dec1079a17 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 29 Mar 2023 21:26:13 +0800 Subject: [PATCH] refactor: use tanstack query to refactor setting-form-related fetching of theme and plugin (#3604) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 使用 [TanStack Query](https://github.com/TanStack/query) 重构主题和插件设置表单的逻辑,移除无意义的重复请求。 #### Which issue(s) this PR fixes: Ref https://github.com/halo-dev/halo/issues/3360 #### Special notes for your reviewer: 测试方式: 1. 安装若干带有设置表单的主题和插件。 2. 测试主题和插件的设置表单是否加载正常,以及保存设置后再重复加载的时候是否正常。 #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../modules/interface/themes/ThemeSetting.vue | 57 ++++----- .../interface/themes/layouts/ThemeLayout.vue | 117 +++++++++--------- .../modules/system/plugins/PluginSetting.vue | 48 ++++--- .../system/plugins/layouts/PluginLayout.vue | 112 ++++++++--------- console/src/modules/system/users/UserList.vue | 1 - 5 files changed, 159 insertions(+), 176 deletions(-) diff --git a/console/src/modules/interface/themes/ThemeSetting.vue b/console/src/modules/interface/themes/ThemeSetting.vue index 4226d72d6..699c3142a 100644 --- a/console/src/modules/interface/themes/ThemeSetting.vue +++ b/console/src/modules/interface/themes/ThemeSetting.vue @@ -1,6 +1,6 @@