mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 05:50:18 +08:00
refactor(projects): 抽离格式化相关依赖配置
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ref } from 'vue';
|
||||
import type { Ref } from 'vue';
|
||||
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { useLoading, useBoolean } from '@/hooks';
|
||||
import { useBoolean, useLoading } from '@/hooks';
|
||||
import CustomAxiosInstance from './instance';
|
||||
|
||||
type RequestMethod = 'get' | 'post' | 'put' | 'delete';
|
||||
@@ -89,12 +89,12 @@ export function createRequest(axiosConfig: AxiosRequestConfig, backendConfig?: S
|
||||
};
|
||||
}
|
||||
|
||||
type RequestResultHook<T = any> = {
|
||||
interface RequestResultHook<T = any> {
|
||||
data: Ref<T | null>;
|
||||
error: Ref<Service.RequestError | null>;
|
||||
loading: Ref<boolean>;
|
||||
network: Ref<boolean>;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建hooks请求
|
||||
|
||||
Reference in New Issue
Block a user