From 57a1be1c1513229233fb7190f0beb761ca5b3061 Mon Sep 17 00:00:00 2001 From: xingyu Date: Thu, 27 Apr 2023 12:56:54 +0800 Subject: [PATCH] fix: file config --- src/views/infra/fileConfig/FileConfigModal.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/infra/fileConfig/FileConfigModal.vue b/src/views/infra/fileConfig/FileConfigModal.vue index c7bf087b..87286cba 100644 --- a/src/views/infra/fileConfig/FileConfigModal.vue +++ b/src/views/infra/fileConfig/FileConfigModal.vue @@ -37,7 +37,14 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data async function handleSubmit() { try { - const values = await validate() + let values = await validate() + let config: any = {} + for (let item in values) { + if (item.startsWith('config.')) { + config[item.substring(7)] = values[item] + } + } + values.config = config setModalProps({ confirmLoading: true }) if (unref(isUpdate)) { await updateFileConfig(values) @@ -46,8 +53,8 @@ async function handleSubmit() { } closeModal() emit('success') - } finally { createMessage.success(t('common.saveSuccessText')) + } finally { setModalProps({ confirmLoading: false }) } }