2020-12-27 22:25:35 +08:00
|
|
|
import { MockMethod } from 'vite-plugin-mock';
|
|
|
|
import { resultSuccess } from '../_util';
|
|
|
|
|
2021-06-14 22:10:41 +08:00
|
|
|
const list: any[] = [];
|
2020-12-27 22:25:35 +08:00
|
|
|
const demoList = (() => {
|
2021-06-14 22:10:41 +08:00
|
|
|
const result = {
|
|
|
|
list: list,
|
|
|
|
};
|
2020-12-27 22:25:35 +08:00
|
|
|
for (let index = 0; index < 20; index++) {
|
2021-06-14 22:10:41 +08:00
|
|
|
result.list.push({
|
|
|
|
name: `选项${index}`,
|
|
|
|
id: `${index}`,
|
2020-12-27 22:25:35 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
})();
|
|
|
|
|
|
|
|
export default [
|
|
|
|
{
|
2021-03-11 01:22:10 +08:00
|
|
|
url: '/basic-api/select/getDemoOptions',
|
2021-06-14 22:10:41 +08:00
|
|
|
timeout: 1000,
|
|
|
|
method: 'post',
|
2020-12-27 22:25:35 +08:00
|
|
|
response: ({ query }) => {
|
2021-02-09 23:47:14 +08:00
|
|
|
console.log(query);
|
2020-12-27 22:25:35 +08:00
|
|
|
return resultSuccess(demoList);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
] as MockMethod[];
|