增加模拟请求工具
This commit is contained in:
7
src/utils/mock.ts
Normal file
7
src/utils/mock.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export const delay = (time: number, data?: any) => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(data);
|
||||||
|
}, time);
|
||||||
|
}) as any;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user