mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-04 03:16:02 +00:00
perf(form): improve the form function
This commit is contained in:
24
mock/demo/select-demo.ts
Normal file
24
mock/demo/select-demo.ts
Normal 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[];
|
Reference in New Issue
Block a user