savor-ui 0.15.1 → 0.15.2

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.15.2](https://gitee.com/mach552/savor-ui/compare/v0.15.1...v0.15.2) (2026-08-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **upload:** 修复上传文件字段 ([462e464](https://gitee.com/mach552/savor-ui/commits/462e4645aca8a9301f48505126f169c173d55cb0))
11
+
5
12
  ## [0.15.1](https://gitee.com/mach552/savor-ui/compare/v0.15.0...v0.15.1) (2026-08-03)
6
13
 
7
14
 
@@ -19,6 +19,7 @@ export declare const SUpload: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
19
19
  autoUpload?: boolean | undefined;
20
20
  drag?: boolean | undefined;
21
21
  showList?: boolean | undefined;
22
+ name?: string | undefined;
22
23
  picture?: boolean | undefined;
23
24
  accept?: string | undefined;
24
25
  limit?: number | undefined;
@@ -1,10 +1,10 @@
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 n in e.headers) t.setRequestHeader(n, e.headers[n]);
4
+ if (t.open(e.method, n), 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
- return r.append(e.name, e.file), t.open(e.method, n), t.send(r), t.onprogress = (t) => {
7
+ return r.append(e.name, e.file), t.send(r), t.onprogress = (t) => {
8
8
  e.onProgress?.(t.loaded / t.total * 100);
9
9
  }, t.onload = () => {
10
10
  e.onSuccess?.(t.response);
@@ -33,6 +33,8 @@ export interface UploadProps {
33
33
  drag?: boolean;
34
34
  /** 是否显示上传列表 */
35
35
  showList?: boolean;
36
+ /** 上传文件的名称 */
37
+ name?: string;
36
38
  /** 是否显示图片墙 */
37
39
  picture?: boolean;
38
40
  /** 文件的类型 */
@@ -33,6 +33,7 @@ var M = /*@__PURE__*/ y({
33
33
  type: Boolean,
34
34
  default: !0
35
35
  },
36
+ name: { default: "file" },
36
37
  picture: { type: Boolean },
37
38
  accept: {},
38
39
  limit: {},
@@ -151,7 +152,7 @@ var M = /*@__PURE__*/ y({
151
152
  let t = d({
152
153
  method: "POST",
153
154
  file: e.raw,
154
- name: e.name,
155
+ name: O.name,
155
156
  action: O.action,
156
157
  headers: O.headers,
157
158
  data: O.data,
@@ -2748,6 +2748,10 @@
2748
2748
  "description": "是否显示上传列表",
2749
2749
  "type": "boolean"
2750
2750
  },
2751
+ "s-upload/name": {
2752
+ "description": "上传文件的名称",
2753
+ "type": "string"
2754
+ },
2751
2755
  "s-upload/picture": {
2752
2756
  "description": "是否显示图片墙",
2753
2757
  "type": "boolean"
@@ -1135,6 +1135,7 @@
1135
1135
  "autoUpload",
1136
1136
  "drag",
1137
1137
  "showList",
1138
+ "name",
1138
1139
  "picture",
1139
1140
  "accept",
1140
1141
  "limit",
@@ -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.15.0",
5
+ "version": "0.15.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -6971,6 +6971,14 @@
6971
6971
  "kind": "expression"
6972
6972
  }
6973
6973
  },
6974
+ {
6975
+ "name": "name",
6976
+ "description": "上传文件的名称",
6977
+ "value": {
6978
+ "type": "string",
6979
+ "kind": "expression"
6980
+ }
6981
+ },
6974
6982
  {
6975
6983
  "name": "picture",
6976
6984
  "description": "是否显示图片墙",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "savor-ui",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "A Vue3 Components Library",
5
5
  "keywords": [
6
6
  "component library",