提交 5e78249b 作者: 方治民

refactor: 重构 pont 模板生成规则、自动导入补充 defs 、新增 vue-router 全局组件定义、规范统一 axios 网络请求相关类型、重新生成示例 API

上级 0fb3b3b0
......@@ -10,6 +10,14 @@ import AutoImport from 'unplugin-auto-import/vite'
export function configAutoImportPlugin(): Plugin {
return AutoImport({
dts: 'types/auto-imports.d.ts',
imports: ['vue', 'vue-router', { '/@/config/app': ['$app'] }, { '/@/api/services/mods': ['API'] }],
imports: [
'vue',
'vue-router',
{
'/@/config/app': ['$app'],
'/@/api/services': ['defs'],
'/@/api/services/mods': ['API'],
},
],
})
}
......@@ -11,7 +11,7 @@
- ⭐EditorConfig
- ⭐TODO Highlight
- ⭐Volar
-[pont](https://marketplace.visualstudio.com/items?itemName=jasonHzq.vscode-pont) 接口自动化工具,必装
-[pont](https://marketplace.visualstudio.com/items?itemName=jasonHzq.vscode-pont) 接口自动化工具,**必装**
- ESLint
- stylelint
......
import { Interface, BaseClass, Property, CodeGenerator, Surrounding } from 'pont-engine'
import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine'
export default class BasicGenerator extends CodeGenerator {
getParams(inter: Interface) {
......@@ -6,8 +6,8 @@ export default class BasicGenerator extends CodeGenerator {
return `${requestParams.replace(
'options?: any',
`config?: axios.RequestConfig<Params${requestParams.includes('form') ? ' | FormData' : ''}>`,
)}, options?: axios.RequestOptions`
`config?: http.RequestConfig<Params${requestParams.includes('form') ? ' | FormData' : ''}>`,
)}, options?: http.RequestOptions`
}
getInterfaceContentInDeclaration(inter: Interface) {
......@@ -83,15 +83,10 @@ export default class BasicGenerator extends CodeGenerator {
/** 获取所有模块的 index 入口文件 */
getModsIndex() {
const isTypeScript = this.surrounding === Surrounding.typeScript
let conclusion = `
export const API = {
${this.dataSource.mods.map((mod) => this.reviseModName(mod.name)).join(', \n')}
};
const getWindow = ()${isTypeScript ? ': any' : ''} => (typeof window === 'undefined' ? {} : window)
getWindow().API = API
`
// dataSource name means multiple dataSource
......@@ -117,16 +112,11 @@ export default class BasicGenerator extends CodeGenerator {
/** 获取接口类和基类的总的 index 入口文件代码 */
getIndex() {
const isTypeScript = this.surrounding === Surrounding.typeScript
let conclusion = `
import * as defs from './baseClass';
import './mods/';
export { defs };
const getWindow = ()${isTypeScript ? ': any' : ''} => (typeof window === 'undefined' ? {} : window)
getWindow().defs = defs
`
// dataSource name means multiple dataSource
......
......@@ -3,6 +3,7 @@
"mods": [
{
"description": "",
"name": "auth",
"interfaces": [
{
"consumes": [
......@@ -240,11 +241,11 @@
}
]
}
],
"name": "auth"
]
},
{
"description": "",
"name": "hello",
"interfaces": [
{
"description": "hello",
......@@ -398,11 +399,11 @@
}
]
}
],
"name": "hello"
]
},
{
"description": "",
"name": "minio",
"interfaces": [
{
"consumes": [
......@@ -449,11 +450,11 @@
}
]
}
],
"name": "minio"
]
},
{
"description": "",
"name": "permission",
"interfaces": [
{
"consumes": [
......@@ -1078,11 +1079,11 @@
}
]
}
],
"name": "permission"
]
},
{
"description": "",
"name": "role",
"interfaces": [
{
"consumes": [
......@@ -1502,11 +1503,11 @@
},
"parameters": []
}
],
"name": "role"
]
},
{
"description": "",
"name": "user",
"interfaces": [
{
"description": "获取登录用户信息",
......@@ -1694,13 +1695,13 @@
}
]
}
],
"name": "user"
]
}
],
"baseClasses": [
{
"name": "LoginVo",
"templateArgs": [],
"properties": [
{
"dataType": {
......@@ -1716,11 +1717,21 @@
"description": "token",
"required": false
}
],
"templateArgs": []
]
},
{
"name": "PageVo",
"templateArgs": [
{
"typeArgs": [],
"typeName": "PermissionVo",
"isDefsType": true,
"templateIndex": -1,
"compileTemplateKeyword": "#/definitions/",
"enum": [],
"typeProperties": []
}
],
"properties": [
{
"dataType": {
......@@ -1774,21 +1785,11 @@
"description": "数据总数",
"required": false
}
],
"templateArgs": [
{
"typeArgs": [],
"typeName": "PermissionVo",
"isDefsType": true,
"templateIndex": -1,
"compileTemplateKeyword": "#/definitions/",
"enum": [],
"typeProperties": []
}
]
},
{
"name": "PermissionVo",
"templateArgs": [],
"properties": [
{
"dataType": {
......@@ -1971,11 +1972,21 @@
"description": "标识",
"required": false
}
],
"templateArgs": []
]
},
{
"name": "Result",
"templateArgs": [
{
"typeArgs": [],
"typeName": "LoginVo",
"isDefsType": true,
"templateIndex": -1,
"compileTemplateKeyword": "#/definitions/",
"enum": [],
"typeProperties": []
}
],
"properties": [
{
"dataType": {
......@@ -2089,21 +2100,11 @@
"description": "响应时间",
"required": false
}
],
"templateArgs": [
{
"typeArgs": [],
"typeName": "LoginVo",
"isDefsType": true,
"templateIndex": -1,
"compileTemplateKeyword": "#/definitions/",
"enum": [],
"typeProperties": []
}
]
},
{
"name": "RoleVo",
"templateArgs": [],
"properties": [
{
"dataType": {
......@@ -2171,11 +2172,11 @@
"description": "标识",
"required": false
}
],
"templateArgs": []
]
},
{
"name": "UserInfo",
"templateArgs": [],
"properties": [
{
"dataType": {
......@@ -2337,11 +2338,11 @@
"description": "用户名",
"required": false
}
],
"templateArgs": []
]
},
{
"name": "UserVo",
"templateArgs": [],
"properties": [
{
"dataType": {
......@@ -2511,8 +2512,7 @@
"description": "用户名",
"required": false
}
],
"templateArgs": []
]
}
],
"name": ""
......
......@@ -191,8 +191,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -209,8 +209,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -244,8 +244,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......@@ -267,8 +267,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -285,8 +285,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -312,8 +312,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......@@ -336,8 +336,8 @@ declare namespace API {
export function request(
params: Params,
form: FormData,
config?: axios.RequestConfig<Params | FormData>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......@@ -380,8 +380,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -401,8 +401,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -422,8 +422,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -463,8 +463,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -490,8 +490,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -511,8 +511,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......@@ -539,8 +539,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -562,8 +562,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -583,8 +583,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -604,8 +604,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -629,8 +629,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -656,8 +656,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -674,8 +674,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......@@ -697,8 +697,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -720,8 +720,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
......@@ -747,8 +747,8 @@ declare namespace API {
export function request(
params: Params,
config?: axios.RequestConfig<Params>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
......
......@@ -2,6 +2,3 @@ import * as defs from './baseClass'
import './mods/'
export { defs }
const getWindow = (): any => (typeof window === 'undefined' ? {} : window)
getWindow().defs = defs
......@@ -14,7 +14,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/auth/login',
......
......@@ -9,7 +9,7 @@ export class Params {}
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/auth/logout',
......
......@@ -26,7 +26,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/auth/register',
......
......@@ -9,7 +9,7 @@ export class Params {}
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/hello/fail',
......
......@@ -9,7 +9,7 @@ export class Params {}
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/hello/',
......
......@@ -18,7 +18,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/hello/page',
......
......@@ -13,6 +13,3 @@ export const API = {
role,
user,
}
const getWindow = (): any => (typeof window === 'undefined' ? {} : window)
getWindow().API = API
......@@ -12,8 +12,8 @@ export const init = new defs.Result()
export function request(
params: Params,
form: FormData,
config?: axios.RequestConfig<Params | FormData>,
options?: axios.RequestOptions,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions,
) {
return Http.request(
{
......
......@@ -30,7 +30,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/add',
......
......@@ -12,7 +12,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/deleted',
......
......@@ -12,7 +12,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/find',
......
......@@ -32,7 +32,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/modify',
......
......@@ -18,7 +18,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/page',
......
......@@ -12,7 +12,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/permission/tree',
......
......@@ -14,7 +14,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/add',
......
......@@ -14,7 +14,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/assign',
......
......@@ -12,7 +12,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/deleted',
......
......@@ -12,7 +12,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/find',
......
......@@ -16,7 +16,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/modify',
......
......@@ -18,7 +18,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/page',
......
......@@ -9,7 +9,7 @@ export class Params {}
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/manage/role/selector',
......
......@@ -14,7 +14,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/user/manage/assign',
......
......@@ -9,7 +9,7 @@ export class Params {}
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/user/info',
......
......@@ -18,7 +18,7 @@ export class Params {
export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return Http.request(
{
url: '/basic-api/user/manage/page',
......
/**
* @description: Request result set
*/
export enum ResultEnum {
SUCCESS = 0,
ERROR = 1,
TIMEOUT = 401,
TYPE = 'success',
}
export enum ResultEnum {}
/**
* @description: request method
......
......@@ -8,13 +8,16 @@ export class AxiosRetry {
* 重试
*/
retry(AxiosInstance: AxiosInstance, error: AxiosError) {
// @ts-ignore
const { config } = error.response
// @ts-ignore
const { waitTime, count } = config?.requestOptions?.retryRequest
// @ts-ignore
config.__retryCount = config.__retryCount || 0
// @ts-ignore
if (config.__retryCount >= count) {
return Promise.reject(error)
}
// @ts-ignore
config.__retryCount += 1
return this.delay(waitTime).then(() => AxiosInstance(config))
}
......
......@@ -3,7 +3,7 @@
import type { AxiosResponse } from 'axios'
import { clone } from 'lodash-es'
import type { RequestOptions } from '/#/axios'
import type { RequestOptions, Result } from '/#/axios'
import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform'
import { VAxios } from './Axios'
import { checkStatus } from './checkStatus'
......@@ -31,7 +31,7 @@ const transform: AxiosTransform = {
/**
* @description: 处理请求数据。如果数据不是预期格式,可直接抛出错误
*/
transformRequestHook: (res: AxiosResponse<defs.Result>, options: RequestOptions) => {
transformRequestHook: (res: AxiosResponse<Result>, options: RequestOptions) => {
const { t } = useI18n()
const { isTransformResponse, isReturnNativeResponse } = options
// 是否返回原生响应头 比如:需要获取响应头时使用该属性
......@@ -259,7 +259,7 @@ export const defHttp = createAxios()
// 自定义配置
// TODO: 实际项目所需的请求配置
// const { apiUrl } = useGlobSetting()
// const { apiUrl } = globSetting
const apiUrl = 'http://localhost:8181'
export const Http = createAxios({
headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
......
......@@ -4,6 +4,6 @@ export class Result {
code: 0,
success: true,
result: data,
};
}
}
}
......@@ -8,6 +8,7 @@ declare global {
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defs: typeof import('/@/api/services')['defs']
const effectScope: typeof import('vue')['effectScope']
const EffectScope: typeof import('vue')['EffectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
......
export type ErrorMessageMode = 'none' | 'modal' | 'message' | undefined
export interface RequestOptions {
// Splicing request parameters to url
joinParamsToUrl?: boolean
// Format request parameter time
formatDate?: boolean
// Whether to process the request result
isTransformResponse?: boolean
// Whether to return native response headers
// For example: use this attribute when you need to get the response headers
isReturnNativeResponse?: boolean
// Whether to join url
joinPrefix?: boolean
// Interface address, use the default apiUrl if you leave it blank
apiUrl?: string
// 请求拼接路径
urlPrefix?: string
// Error message prompt type
errorMessageMode?: ErrorMessageMode
// Whether to add a timestamp
joinTime?: boolean
ignoreCancelToken?: boolean
// Whether to send token in header
withToken?: boolean
// 请求重试机制
retryRequest?: RetryRequest
}
export type RequestOptions = http.RequestOptions
export interface RetryRequest {
isOpenRetry: boolean
count: number
waitTime: number
}
export interface Result<T = any> {
code: number
type: 'success' | 'error' | 'warning'
message: string
result: T
}
export type Result<T = any> = defs.Result<T>
// multipart/form-data: upload file
export interface UploadFileParams {
......
// components.d.ts
declare module '@vue/runtime-core' {
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}
export {}
......@@ -96,7 +96,7 @@ declare global {
}
// 扩展类型,用于在 pont 生成的 api.d.ts 内部使用
namespace axios {
namespace http {
declare interface RequestOptions {
// Splicing request parameters to url
joinParamsToUrl?: boolean
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论