From c50db4089c4aa213e7613d4bc62ac4e9ae684e91 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 9 Oct 2023 17:02:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=9A=90=E8=97=8F=E8=AE=BE=E7=BD=AE=20?= =?UTF-8?q?terminal=5Ftheme=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserSettingUpdate/AllPreferenceUpdate.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/profile/UserSettingUpdate/AllPreferenceUpdate.vue b/src/views/profile/UserSettingUpdate/AllPreferenceUpdate.vue index 69b585d63..1bece9f58 100644 --- a/src/views/profile/UserSettingUpdate/AllPreferenceUpdate.vue +++ b/src/views/profile/UserSettingUpdate/AllPreferenceUpdate.vue @@ -7,6 +7,7 @@ :initial="object" :submit-method="submitMethod" :url="url" + :clean-form-value="cleanFormValue" class="password-update" /> @@ -61,7 +62,9 @@ export default { for (const k in this.remoteMeta) { if (this.remoteMeta.hasOwnProperty(k)) { fields.push([this.remoteMeta[k].label, [k]]) - fieldsMeta[k] = { 'fields': Object.keys(this.remoteMeta[k].children) } + fieldsMeta[k] = { 'fields': Object.keys(this.remoteMeta[k].children).filter( + // todo: remove this when we have a better solution + (key) => key !== 'terminal_theme_name') } } } @@ -83,6 +86,13 @@ export default { }, submitMethod() { return 'patch' + }, + cleanFormValue(value) { + if (this.category === 'koko') { + // todo: remove this when we have a better solution + delete value['basic']['terminal_theme_name'] + } + return value } } }