vben
authored
|
1
2
3
|
import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';
|
M69W
authored
|
4
|
const list: any[] = [];
|
vben
authored
|
5
|
const demoList = (() => {
|
M69W
authored
|
6
7
8
|
const result = {
list: list,
};
|
vben
authored
|
9
|
for (let index = 0; index < 20; index++) {
|
M69W
authored
|
10
11
12
|
result.list.push({
name: `选项${index}`,
id: `${index}`,
|
vben
authored
|
13
14
15
16
17
18
19
|
});
}
return result;
})();
export default [
{
|
Vben
authored
|
20
|
url: '/basic-api/select/getDemoOptions',
|
M69W
authored
|
21
22
|
timeout: 1000,
method: 'post',
|
vben
authored
|
23
|
response: ({ query }) => {
|
vben
authored
|
24
|
console.log(query);
|
vben
authored
|
25
26
27
28
|
return resultSuccess(demoList);
},
},
] as MockMethod[];
|