0.0.41 • Published 7 months ago
ecode-common v0.0.41
EcodeCommon
ecode 通用定义模块 定义各通用模型
export interface IdDatum {
id: string;
}
export interface IQueryParam {
}
export class PageInfo<T>{
total: number = 0;
list: T[] = [];
startRow!: number;
endRow!: number;
size!: number;
prePage!: number;
pages!: number;
pageNum!: number;
pageSize!: number;
nextPage!: number;
navigatepageNums!: number[];
navigatePages!: number;
navigateLastPage!: number;
navigateFirstPage!: number;
isLastPage!: boolean;
isFirstPage!: boolean;
hasPreviousPage!: boolean;
}
export class PageParam {
pageIndex: number = 1;
pageSize: number = 10;
constructor(pageIndex: number = 1, pageSize: number = 10) {
this.pageIndex = pageIndex;
this.pageSize = pageSize;
}
}
export class RequestHeader extends HttpHeaders {
constructor() {
super({
'Content-Type': 'application/json'
});
}
}
export class ResponseResult<T>{
code: string = '1';
message: string = '';
exceptionType: string = '';
data?: T;
}
export class StringIdDatum implements IdDatum {
id: string = '';
}
安装
npm install ecode-common
在moudle里引入模块
@NgModule({
providers: [
],
imports: [
EcodeCommonModule
]
})
引入使用
import { RequestHeader, ResponseResult } from "ecode-common";
0.0.40
8 months ago
0.0.41
7 months ago
0.0.38
9 months ago
0.0.39
8 months ago
0.0.37
9 months ago
0.0.36
10 months ago
0.0.35
10 months ago
0.0.34
10 months ago
0.0.33
10 months ago
0.0.32
10 months ago
0.0.31
10 months ago
0.0.30
10 months ago
0.0.29
10 months ago
0.0.28
10 months ago
0.0.26
10 months ago
0.0.25
10 months ago
0.0.24
10 months ago
0.0.21
10 months ago
0.0.20
10 months ago
0.0.1
10 months ago