diff --git a/src/components/Button/src/props.ts b/src/components/Button/src/props.ts index cdd74a3a..d2a9a5ba 100644 --- a/src/components/Button/src/props.ts +++ b/src/components/Button/src/props.ts @@ -22,5 +22,5 @@ export const buttonProps = { * @default: 14 */ iconSize: { type: Number, default: 14 }, - onClick: { type: Function as PropType<(...args) => any>, default: null }, + onClick: { type: [Function, Array] as PropType<(() => any) | (() => any)[]>, default: null }, } diff --git a/src/utils/http/axios/Axios.ts b/src/utils/http/axios/Axios.ts index b4a0ffbc..3dbf074c 100644 --- a/src/utils/http/axios/Axios.ts +++ b/src/utils/http/axios/Axios.ts @@ -90,7 +90,7 @@ export class VAxios { // 请求拦截器配置处理 this.axiosInstance.interceptors.request.use((config: InternalAxiosRequestConfig) => { - const { requestOptions } = this.options + const requestOptions = (config as unknown as any).requestOptions ?? this.options.requestOptions const ignoreCancelToken = requestOptions?.ignoreCancelToken ?? true !ignoreCancelToken && axiosCanceler.addPending(config) @@ -331,6 +331,9 @@ export class VAxios { if (config.cancelToken) conf.cancelToken = config.cancelToken + if (config.signal) + conf.signal = config.signal + const transform = this.getTransform() const { requestOptions } = this.options