From e20ec1154db527e336b65774080aaa2edb81120a Mon Sep 17 00:00:00 2001 From: Yuikill <1191184301@qq.com> Date: Tue, 20 Feb 2024 09:53:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=BB=BA=E5=AF=86=E9=92=A5?= =?UTF-8?q?=E5=90=8E=E7=BD=AE=E9=A1=B6=E8=AF=A5=E5=AF=86=E9=92=A5=EF=BC=8C?= =?UTF-8?q?=E5=8F=98=E7=BB=BF=E5=BA=95--story=3D116089325?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bcs-bscp/ui/src/views/space/credentials/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bcs-services/bcs-bscp/ui/src/views/space/credentials/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/credentials/index.vue index 7b43dcb274..a9dccdc153 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/credentials/index.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/credentials/index.vue @@ -335,13 +335,16 @@ // 加载密钥列表 const loadCredentialList = async () => { - const query: { limit: number; start: number; searchKey?: string } = { + const query: { limit: number; start: number; searchKey?: string; top_ids?: number } = { start: pagination.value.limit * (pagination.value.current - 1), limit: pagination.value.limit, }; if (searchStr.value) { query.searchKey = searchStr.value; } + if (newCredentials.value.length > 0) { + query.top_ids = newCredentials.value[0]; + } const res = await getCredentialList(spaceId.value, query); res.details.forEach((item: ICredentialItem) => (item.visible = false)); credentialList.value = res.details; @@ -414,8 +417,8 @@ message: t('新建服务密钥成功'), }); pagination.value.current = 1; - await loadCredentialList(); newCredentials.value.push(res.id); + await loadCredentialList(); setTimeout(() => { const index = newCredentials.value.indexOf(res.id); newCredentials.value.splice(index, 1);