perf(form): improve the form function

This commit is contained in:
vben
2020-12-27 22:25:35 +08:00
parent 4ff1c408dc
commit ac1a369502
23 changed files with 344 additions and 100 deletions

24
mock/demo/select-demo.ts Normal file
View File

@@ -0,0 +1,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[];