savor-ui 0.15.0 → 0.15.1
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.
- package/CHANGELOG.md +7 -0
- package/dist/es/components/src/upload/index.d.ts +1 -1
- package/dist/es/components/src/upload/request.mjs +1 -1
- package/dist/es/components/src/upload/types.d.ts +2 -2
- package/dist/es/components/src/upload/upload.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
- package/dist/json/web-types.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.15.1](https://gitee.com/mach552/savor-ui/compare/v0.15.0...v0.15.1) (2026-08-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **upload:** 修复无法遍历headers的问题 ([8b7d4bf](https://gitee.com/mach552/savor-ui/commits/8b7d4bf49991a1d67d0970d67f067550b004bfad))
|
|
11
|
+
|
|
5
12
|
# [0.15.0](https://gitee.com/mach552/savor-ui/compare/v0.14.2...v0.15.0) (2026-08-02)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -13,7 +13,7 @@ export declare const SUpload: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
13
13
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
14
14
|
props: PublicProps & {
|
|
15
15
|
multiple?: boolean | undefined;
|
|
16
|
-
headers?:
|
|
16
|
+
headers?: Record<string, any> | undefined;
|
|
17
17
|
data?: Record<string, any> | undefined;
|
|
18
18
|
action?: string | undefined;
|
|
19
19
|
autoUpload?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region ../components/src/upload/request.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = new XMLHttpRequest(), n = e.action || "";
|
|
4
|
-
if (e.headers) for (let
|
|
4
|
+
if (e.headers) for (let n in e.headers) t.setRequestHeader(n, e.headers[n]);
|
|
5
5
|
let r = new FormData();
|
|
6
6
|
if (e.data) for (let t in e.data) r.append(t, e.data[t]);
|
|
7
7
|
return r.append(e.name, e.file), t.open(e.method, n), t.send(r), t.onprogress = (t) => {
|
|
@@ -12,7 +12,7 @@ export interface RequestOptions {
|
|
|
12
12
|
file: File;
|
|
13
13
|
name: string;
|
|
14
14
|
action?: string;
|
|
15
|
-
headers?:
|
|
15
|
+
headers?: Record<string, any>;
|
|
16
16
|
data?: Record<string, any>;
|
|
17
17
|
onError: (error: any) => void;
|
|
18
18
|
onSuccess: (response: any) => void;
|
|
@@ -22,7 +22,7 @@ export interface UploadProps {
|
|
|
22
22
|
/** 是否支持多选 */
|
|
23
23
|
multiple?: boolean;
|
|
24
24
|
/** 请求头 */
|
|
25
|
-
headers?:
|
|
25
|
+
headers?: Record<string, any>;
|
|
26
26
|
/** 请求体 */
|
|
27
27
|
data?: Record<string, any>;
|
|
28
28
|
/** 请求地址 */
|
package/dist/es/components/src/upload/upload.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -174,7 +174,7 @@ var M = /*@__PURE__*/ y({
|
|
|
174
174
|
n && await t(n);
|
|
175
175
|
} else for (let e of F.value) e.status !== "success" && await t(e);
|
|
176
176
|
};
|
|
177
|
-
|
|
177
|
+
ie(() => {
|
|
178
178
|
U.forEach((e) => e.abort()), U.clear(), F.value.forEach((e) => W(e.url));
|
|
179
179
|
}), b({ upload: Z });
|
|
180
180
|
let ye = ne(), Q = fe(), $ = f(Q);
|
package/dist/json/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "savor-ui",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.15.0",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -6927,7 +6927,7 @@
|
|
|
6927
6927
|
"name": "headers",
|
|
6928
6928
|
"description": "请求头",
|
|
6929
6929
|
"value": {
|
|
6930
|
-
"type": "
|
|
6930
|
+
"type": "Record<string, any>",
|
|
6931
6931
|
"kind": "expression"
|
|
6932
6932
|
}
|
|
6933
6933
|
},
|