cosey 0.4.25 → 0.4.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,6 +68,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
68
68
|
requestConfig: {
|
|
69
69
|
type: Object,
|
|
70
70
|
required: false
|
|
71
|
+
},
|
|
72
|
+
requestExtra: {
|
|
73
|
+
type: Object,
|
|
74
|
+
required: false
|
|
71
75
|
}
|
|
72
76
|
}, defaultUploadProps),
|
|
73
77
|
emits: ["exceed", "update:modelValue", "change"],
|
|
@@ -201,7 +205,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
201
205
|
}
|
|
202
206
|
props.requestConfig?.onUploadProgress?.(event);
|
|
203
207
|
}
|
|
204
|
-
}).then(url => {
|
|
208
|
+
}, props.requestExtra).then(url => {
|
|
205
209
|
options.onSuccess(url);
|
|
206
210
|
}).catch(() => {
|
|
207
211
|
options.onError();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
2
2
|
export interface UploadContext {
|
|
3
|
-
request?: (data: Blob, config?: AxiosRequestConfig) => Promise<string>;
|
|
3
|
+
request?: (data: Blob, config?: AxiosRequestConfig, extra?: Record<PropertyKey, any>) => Promise<string>;
|
|
4
4
|
}
|
|
5
5
|
export declare const useUploadProvide: (context: UploadContext) => void;
|
|
6
6
|
export declare const useUpload: () => UploadContext | null;
|