mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 1.0 beta
This commit is contained in:
10
packages/request/src/axios/index.ts
Normal file
10
packages/request/src/axios/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import axios from 'axios';
|
||||
import type { CreateAxiosDefaults } from 'axios';
|
||||
|
||||
export function createAxios(config?: CreateAxiosDefaults) {
|
||||
const instance = axios.create(config);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
export default createAxios;
|
4
packages/request/src/index.ts
Normal file
4
packages/request/src/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { createAxios } from './axios';
|
||||
import { createOfetch } from './ofetch';
|
||||
|
||||
export { createAxios, createOfetch };
|
10
packages/request/src/ofetch/index.ts
Normal file
10
packages/request/src/ofetch/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { ofetch } from 'ofetch';
|
||||
import type { FetchOptions } from 'ofetch';
|
||||
|
||||
export function createOfetch(options: FetchOptions) {
|
||||
const request = ofetch.create(options);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
export default createOfetch;
|
Reference in New Issue
Block a user