mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-28 06:31:46 +00:00
fix(ApiSelect demo): add demo about ApiSelect's use (#757)
* fix(ApiSelect demo): add demo about ApiSelect's use * fix(ApiSelect demo): typo * revert(ApiSelect): remove console Co-authored-by: M69W <M69W@M69W>
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import { MockMethod } from 'vite-plugin-mock';
|
||||
import { resultSuccess } from '../_util';
|
||||
|
||||
const list: any[] = [];
|
||||
const demoList = (() => {
|
||||
const result: any[] = [];
|
||||
const result = {
|
||||
list: list,
|
||||
};
|
||||
for (let index = 0; index < 20; index++) {
|
||||
result.push({
|
||||
label: `选项${index}`,
|
||||
value: `${index}`,
|
||||
result.list.push({
|
||||
name: `选项${index}`,
|
||||
id: `${index}`,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
@@ -15,8 +18,8 @@ const demoList = (() => {
|
||||
export default [
|
||||
{
|
||||
url: '/basic-api/select/getDemoOptions',
|
||||
timeout: 2000,
|
||||
method: 'get',
|
||||
timeout: 1000,
|
||||
method: 'post',
|
||||
response: ({ query }) => {
|
||||
console.log(query);
|
||||
return resultSuccess(demoList);
|
||||
|
Reference in New Issue
Block a user