feat(table): add table component

This commit is contained in:
陈文彬
2020-10-08 01:35:05 +08:00
parent 5b0a21ecb0
commit faf3f4602e
71 changed files with 3948 additions and 202 deletions

View File

@@ -0,0 +1,20 @@
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: 请求列表接口参数
*/
export type DemoParams = BasicPageParams;
export interface DemoListItem {
id: string;
beginTime: string;
endTime: string;
address: string;
name: string;
no: number;
status: number;
}
/**
* @description: 请求列表返回值
*/
export type DemoListGetResultModel = BasicFetchResult<DemoListItem>;

17
src/api/demo/table.ts Normal file
View File

@@ -0,0 +1,17 @@
import { defHttp } from '/@/utils/http/axios';
import { DemoParams, DemoListGetResultModel } from './model/tableModel';
enum Api {
DEMO_LIST = '/table/getDemoList',
}
/**
* @description: 获取示例列表值
*/
export function demoListApi(params: DemoParams) {
return defHttp.request<DemoListGetResultModel>({
url: Api.DEMO_LIST,
method: 'GET',
params,
});
}

View File

@@ -0,0 +1,9 @@
export interface BasicPageParams {
page: number;
pageSize: number;
}
export interface BasicFetchResult<T extends any> {
items: T;
total: number;
}