feat: add vue3(element-plus)

This commit is contained in:
xingyu
2022-07-18 19:06:37 +08:00
parent c6b58dca52
commit 80a3ae8d74
423 changed files with 41039 additions and 0 deletions

View File

@ -0,0 +1,46 @@
// import { service } from '@/config/axios'
// import { AxiosPromise } from 'axios'
// import { config } from '@/config/axios/config'
// const { default_headers } = config
// const request = <T>(option: AxiosConfig): AxiosPromise<T> => {
// const { url, method, params, data, headersType, responseType } = option
// return service({
// url: url,
// method,
// params,
// data,
// responseType: responseType,
// headers: {
// 'Content-Type': headersType || default_headers
// }
// })
// }
// function getFn<T = any>(option: AxiosConfig): AxiosPromise<T> {
// return request<T>({ method: 'get', ...option })
// }
// function postFn<T = any>(option: AxiosConfig): AxiosPromise<T> {
// return request<T>({ method: 'post', ...option })
// }
// function deleteFn<T = any>(option: AxiosConfig): AxiosPromise<T> {
// return request<T>({ method: 'delete', ...option })
// }
// function putFn<T = any>(option: AxiosConfig): AxiosPromise<T> {
// return request<T>({ method: 'put', ...option })
// }
// export const useAxios = () => {
// return {
// get: getFn,
// post: postFn,
// delete: deleteFn,
// put: putFn
// }
// }