Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 新建密钥后置顶该密钥,变绿底--story=116089325 #2947

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Loading