Ai
1 Star 8 Fork 7

Github/vben-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
select-demo.ts 641 Bytes
一键复制 编辑 原始数据 按行查看 历史
最后 提交于 2021-10-16 21:25 +08:00 . feat(Form): 新增 ApiRadioGroup 组件
import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';
const demoList = (keyword, count = 20) => {
const result = {
list: [] as any[],
};
for (let index = 0; index < count; index++) {
result.list.push({
name: `${keyword ?? ''}选项${index}`,
id: `${index}`,
});
}
return result;
};
export default [
{
url: '/basic-api/select/getDemoOptions',
timeout: 1000,
method: 'get',
response: ({ query }) => {
const { keyword, count } = query;
console.log(keyword);
return resultSuccess(demoList(keyword, count));
},
},
] as MockMethod[];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/dsh-github/vue-vben-admin.git
git@gitee.com:dsh-github/vue-vben-admin.git
dsh-github
vue-vben-admin
vben-admin
main

搜索帮助