From ea44fe7c13da2a214017e8477985c0fc4be450a0 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 25 Jun 2024 19:35:25 +0800 Subject: [PATCH] perf: change krry paging --- .../Apps/BlockedIPs/BlockedIPList.vue | 6 ++- .../FormFields/JSONManyToManySelect/index.vue | 50 +++++++++++-------- src/components/Libs/Krry/paging/index.vue | 14 +++--- .../Libs/Krry/paging/models/box.vue | 5 +- src/styles/index.scss | 2 +- .../AccountDetail/TaskSyncAssetList.vue | 5 +- 6 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/components/Apps/BlockedIPs/BlockedIPList.vue b/src/components/Apps/BlockedIPs/BlockedIPList.vue index db292465d..633d6610f 100644 --- a/src/components/Apps/BlockedIPs/BlockedIPList.vue +++ b/src/components/Apps/BlockedIPs/BlockedIPList.vue @@ -27,7 +27,7 @@ export default { ], columnsMeta: { ip: { - label: this.$t('Ip') + label: this.$t('IP') }, actions: { formatterArgs: { @@ -77,7 +77,9 @@ export default { vm.$axios.post( '/api/v1/settings/security/unlock-ip/', { - ips: selectedRows.map(v => { return v.ip }) + ips: selectedRows.map(v => { + return v.ip + }) } ).then(res => { vm.$message.success(vm.$tc('UnlockSuccessMsg')) diff --git a/src/components/Form/FormFields/JSONManyToManySelect/index.vue b/src/components/Form/FormFields/JSONManyToManySelect/index.vue index b47efd6a4..8da372296 100644 --- a/src/components/Form/FormFields/JSONManyToManySelect/index.vue +++ b/src/components/Form/FormFields/JSONManyToManySelect/index.vue @@ -101,8 +101,8 @@ export default { ids: this.value.ids || [], editIndex: -1, types: [ - { name: 'all', label: this.$t('All') + ' ' + this.resource }, - { name: 'ids', label: this.$t('Spec') + ' ' + this.resource }, + { name: 'all', label: this.$t('All') + this.$t('WordSep') + this.resource.toLowerCase() }, + { name: 'ids', label: this.$t('Spec') + this.$t('WordSep') + this.resource.toLowerCase() }, { name: 'attrs', label: this.$t('SelectByAttr') } ], tableConfig: { @@ -110,26 +110,32 @@ export default { { prop: 'name', label: this.$t('AttrName'), formatter: tableFormatter('name') }, { prop: 'match', label: this.$t('Match'), formatter: tableFormatter('match') }, { prop: 'value', label: this.$t('AttrValue'), formatter: ValueFormatter, formatterArgs: { attrs: this.attrs }}, - { prop: 'action', label: this.$t('Action'), align: 'center', width: '120px', formatter: (row, col, cellValue, index) => { - return ( -
- - -
- ) - } } + { + prop: 'action', + label: this.$t('Action'), + align: 'center', + width: '120px', + formatter: (row, col, cellValue, index) => { + return ( +
+ + +
+ ) + } + } ], totalData: this.value.attrs || [], hasPagination: false diff --git a/src/components/Libs/Krry/paging/index.vue b/src/components/Libs/Krry/paging/index.vue index 827fdd0f0..930400c87 100644 --- a/src/components/Libs/Krry/paging/index.vue +++ b/src/components/Libs/Krry/paging/index.vue @@ -1,7 +1,7 @@