first commit

This commit is contained in:
muzi
2025-06-16 14:42:26 +08:00
commit 6f06721506
149 changed files with 56883 additions and 0 deletions

28
src/mock/table.ts Normal file
View File

@ -0,0 +1,28 @@
import type { IExample } from '@/api/example';
import Mock from 'mockjs';
import setupMock, { successResponseWrap } from './setup-mock';
setupMock({
setup() {
Mock.mock(new RegExp('/api/example-table'), () => {
let tableData: IExample.ITableResponse[] = [];
let count = 20;
tableData = new Array(count).fill('').map((item, index) => ({
id: `${item + 1}`,
column1: `${item + 1}列的第${index + 1}条数据`,
column2: `${item + 2}列的第${index + 1}条数据`,
column3: `${item + 3}列的第${index + 1}条数据`,
column4: `${item + 4}列的第${index + 1}条数据`,
column5: `${item + 5}列的第${index + 1}条数据`,
}));
return successResponseWrap({
records: tableData,
total: tableData.length,
current: 1,
size: 20,
});
});
},
});