From 3fa2cfd860594dc02ccdbcf7096c9d201c697099 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 18 Apr 2023 14:59:49 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=B4=A6=E5=8F=B7=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=20=E4=BC=9A=E4=B8=BB=E5=8A=A8err?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AccountCreateUpdateForm/index.vue | 2 +- src/components/AccountListTable/AccountCreateUpdate.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/AccountCreateUpdateForm/index.vue b/src/components/AccountCreateUpdateForm/index.vue index 9c316f29f..3bd0ad13b 100644 --- a/src/components/AccountCreateUpdateForm/index.vue +++ b/src/components/AccountCreateUpdateForm/index.vue @@ -60,7 +60,7 @@ export default { ] }, url: '/api/v1/accounts/accounts/', - form: Object.assign({ 'on_invalid': 'skip' }, this.account || {}), + form: Object.assign({ 'on_invalid': 'error' }, this.account || {}), encryptedFields: ['secret'], fields: [ [this.$t('assets.Asset'), ['assets']], diff --git a/src/components/AccountListTable/AccountCreateUpdate.vue b/src/components/AccountListTable/AccountCreateUpdate.vue index b255ae040..49888f718 100644 --- a/src/components/AccountListTable/AccountCreateUpdate.vue +++ b/src/components/AccountListTable/AccountCreateUpdate.vue @@ -97,7 +97,7 @@ export default { } } this.$axios.post(url, data, { - disableFlashErrorMsg: true + disableFlashErrorMsg: iVisible }).then((data) => { this.handleResult(data, null) this.iVisible = iVisible @@ -105,6 +105,7 @@ export default { this.$emit('add', true) } }).catch(error => { + this.iVisible = iVisible this.handleResult(null, error) }) },