mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-25 04:38:38 +08:00
26 lines
529 B
TypeScript
26 lines
529 B
TypeScript
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: '/basic-api/select/getDemoOptions',
|
|
timeout: 2000,
|
|
method: 'get',
|
|
response: ({ query }) => {
|
|
console.log(query);
|
|
return resultSuccess(demoList);
|
|
},
|
|
},
|
|
] as MockMethod[];
|