From 50a9ce35ada25600ecddcbf10179fec071e700b4 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 12 Oct 2023 13:57:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?perf:=20=E9=87=8D=E6=9E=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/const.js | 1 + src/layout/components/Page/index.vue | 9 +++++++++ src/store/modules/common.js | 9 ++++++++- src/utils/request.js | 5 +++++ src/views/profile/PassKey.vue | 3 ++- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/components/const.js b/src/components/const.js index 498c850c7..b33678708 100644 --- a/src/components/const.js +++ b/src/components/const.js @@ -19,6 +19,7 @@ export const attrMatchOptions = [ { label: i18n.t('common.Endswith'), value: 'endswith' }, { label: i18n.t('common.Regex'), value: 'regex' }, { label: i18n.t('common.BelongTo'), value: 'm2m' }, + { label: i18n.t('common.BelongToAll'), value: 'm2m_all' }, { label: i18n.t('common.IPMatch'), value: 'ip_in' }, { label: i18n.t('common.GreatEqualThan'), value: 'gte' }, { label: i18n.t('common.LessEqualThan'), value: 'lte' } diff --git a/src/layout/components/Page/index.vue b/src/layout/components/Page/index.vue index 223980343..c0058ea9e 100644 --- a/src/layout/components/Page/index.vue +++ b/src/layout/components/Page/index.vue @@ -15,16 +15,19 @@ + diff --git a/src/views/profile/PassKey.vue b/src/views/profile/PassKey.vue index 2b38c579c..fdd8accea 100644 --- a/src/views/profile/PassKey.vue +++ b/src/views/profile/PassKey.vue @@ -9,6 +9,7 @@ :show-buttons="false" :title="$tc('auth.AddPassKey')" :visible.sync="dialogVisible" + width="600px" > @@ -105,8 +106,7 @@ export default { type: 'primary', can: () => this.$hasPerm('authentication.add_passkey'), callback: function() { - this.$store.dispatch('common/showConfirmDialog', true) - // this.dialogVisible = true + this.dialogVisible = true }.bind(this) } ] @@ -134,6 +134,9 @@ export default { this.getRefsListTable.reloadTable() this.$message.success(this.$tc('common.createSuccessMsg')) }).catch((error) => { + if (error.response.status === 412) { + return + } alert(error) }) }, diff --git a/src/views/profile/ProfileInfo.vue b/src/views/profile/ProfileInfo.vue index 38c642e77..6376e34c8 100644 --- a/src/views/profile/ProfileInfo.vue +++ b/src/views/profile/ProfileInfo.vue @@ -1,12 +1,5 @@