搜索结果列表页面开发

This commit is contained in:
付民康
2025-03-12 18:41:20 +08:00
commit 7cebe8fc00
739 changed files with 88149 additions and 0 deletions

14
src/model/SSHKey.ts Normal file
View File

@@ -0,0 +1,14 @@
import type { SSHData } from '@/components/SecretKeyItem/types';
export class SSHKey implements SSHData {
email: string;
key: string;
createdTime: string;
expireTime: string;
hasBeenUsed: boolean;
authority: string;
id: number | string;
constructor(originData: SSHData) {
Object.assign(this, originData);
}
}

23
src/model/pager.ts Normal file
View File

@@ -0,0 +1,23 @@
export interface IPager {
total?: number;
pageIndex?: number;
pageSize?: number;
pageSizeOptions?: Array<number>;
}
export class Pager implements IPager {
total?: number;
pageIndex: number;
pageSize: number;
pageSizeOptions?: Array<number>;
constructor(
{
total = 0, pageSize = 10, pageIndex = 1, pageSizeOptions = [10, 20, 30, 40, 50]
}: IPager) {
this.total = total;
this.pageSize = pageSize;
this.pageIndex = pageIndex;
this.pageSizeOptions = pageSizeOptions;
}
}

21
src/model/type/index.ts Normal file
View File

@@ -0,0 +1,21 @@
export enum Visibility {
'private' = 'private',
'public' = 'public'
}
export enum CommitStatus {
created = '0',
verified = '1',
invalid = '2'
}
export enum IssueStatus {
created = '0',
verified = '1',
invalid = '2'
}
export enum ResourceType {
directories = 'directories',
paths = 'paths',
}