|
@@ -1,12 +1,15 @@
|
|
import { MockMethod } from 'vite-plugin-mock';
|
|
import { MockMethod } from 'vite-plugin-mock';
|
|
import { resultSuccess } from '../_util';
|
|
import { resultSuccess } from '../_util';
|
|
|
|
|
|
|
|
+const list: any[] = [];
|
|
const demoList = (() => {
|
|
const demoList = (() => {
|
|
- const result: any[] = [];
|
|
|
|
|
|
+ const result = {
|
|
|
|
+ list: list,
|
|
|
|
+ };
|
|
for (let index = 0; index < 20; index++) {
|
|
for (let index = 0; index < 20; index++) {
|
|
- result.push({
|
|
|
|
- label: `选项${index}`,
|
|
|
|
- value: `${index}`,
|
|
|
|
|
|
+ result.list.push({
|
|
|
|
+ name: `选项${index}`,
|
|
|
|
+ id: `${index}`,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
@@ -15,8 +18,8 @@ const demoList = (() => {
|
|
export default [
|
|
export default [
|
|
{
|
|
{
|
|
url: '/basic-api/select/getDemoOptions',
|
|
url: '/basic-api/select/getDemoOptions',
|
|
- timeout: 2000,
|
|
|
|
- method: 'get',
|
|
|
|
|
|
+ timeout: 1000,
|
|
|
|
+ method: 'post',
|
|
response: ({ query }) => {
|
|
response: ({ query }) => {
|
|
console.log(query);
|
|
console.log(query);
|
|
return resultSuccess(demoList);
|
|
return resultSuccess(demoList);
|