1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| import { MockMethod } from 'vite-plugin-mock';
| import { resultSuccess } from '../_util';
|
| const demoList = (() => {
| const result: any[] = [];
| for (let index = 0; index < 20; index++) {
| result.push({
| label: `选项${index}`,
| value: `${index}`,
| });
| }
| return result;
| })();
|
| export default [
| {
| url: '/api/select/getDemoOptions',
| timeout: 4000,
| method: 'get',
| response: ({ query }) => {
| return resultSuccess(demoList);
| },
| },
| ] as MockMethod[];
|
|