jeecgboot-vue 1.0.0 版本发布
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { MockMethod } from 'vite-plugin-mock';
|
||||
import { resultSuccess } from '../_util';
|
||||
import { resultSuccess, baseUrl } from '../_util';
|
||||
|
||||
const demoList = (keyword) => {
|
||||
const demoList = (keyword, count = 20) => {
|
||||
const result = {
|
||||
list: [] as any[],
|
||||
};
|
||||
for (let index = 0; index < 20; index++) {
|
||||
for (let index = 0; index < count; index++) {
|
||||
result.list.push({
|
||||
name: `${keyword ?? ''}选项${index}`,
|
||||
id: `${index}`,
|
||||
@@ -16,13 +16,13 @@ const demoList = (keyword) => {
|
||||
|
||||
export default [
|
||||
{
|
||||
url: '/jeecg-boot/select/getDemoOptions',
|
||||
url: `${baseUrl}/select/getDemoOptions`,
|
||||
timeout: 1000,
|
||||
method: 'get',
|
||||
response: ({ query }) => {
|
||||
const { keyword } = query;
|
||||
const { keyword,count} = query;
|
||||
console.log(keyword);
|
||||
return resultSuccess(demoList(keyword));
|
||||
return resultSuccess(demoList(keyword,count));
|
||||
},
|
||||
},
|
||||
] as MockMethod[];
|
||||
|
Reference in New Issue
Block a user