savor-ui 0.14.2 → 0.15.0

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,14 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.15.0](https://gitee.com/mach552/savor-ui/compare/v0.14.2...v0.15.0) (2026-08-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * **upload:** 添加禁用属性 ([44bc570](https://gitee.com/mach552/savor-ui/commits/44bc570873f340882cca731bad7e72c321065527))
11
+ * **upload:** 新增照片墙模式 ([7fd2908](https://gitee.com/mach552/savor-ui/commits/7fd2908b757fa2b4b699cf2585b98f6825fc0996))
12
+
5
13
  ## [0.14.2](https://gitee.com/mach552/savor-ui/compare/v0.14.1...v0.14.2) (2026-07-31)
6
14
 
7
15
 
@@ -32,7 +32,7 @@ var F = /*@__PURE__*/ h({
32
32
  M(L, (e) => {
33
33
  e ? (I.value = _(), O()) : F();
34
34
  });
35
- let z = j("contentRef"), B = S(0), V = S(1), H = S(0), U = S(0), W = () => {
35
+ let z = j("contentRef"), B = S(0), V = S(.8), H = S(0), U = S(0), W = () => {
36
36
  z.value && (B.value += 90);
37
37
  }, G = () => {
38
38
  z.value && (B.value -= 90);
@@ -41,7 +41,7 @@ var F = /*@__PURE__*/ h({
41
41
  }, q = () => {
42
42
  z.value && (V.value -= .2, V.value < .5 && (V.value = .5));
43
43
  }, J = () => {
44
- z.value && (B.value = 0, V.value = 1, H.value = 0, U.value = 0);
44
+ z.value && (B.value = 0, V.value = .8, H.value = 0, U.value = 0);
45
45
  }, Y = () => {
46
46
  R();
47
47
  }, X = (e) => {
@@ -3,11 +3,13 @@ import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
3
3
  export declare const SUpload: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  attrs: any;
5
5
  slots: {
6
+ trigger?: (props: {}) => any;
7
+ } & {
6
8
  drag?: (props: {}) => any;
7
9
  } & {
8
10
  btn?: (props: {}) => any;
9
11
  };
10
- emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:fileList", value: UploadFile[]) => void);
12
+ emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "preview", file: UploadFile) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:modelValue", value: string) => void);
11
13
  }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
12
14
  props: PublicProps & {
13
15
  multiple?: boolean | undefined;
@@ -17,31 +19,37 @@ export declare const SUpload: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
17
19
  autoUpload?: boolean | undefined;
18
20
  drag?: boolean | undefined;
19
21
  showList?: boolean | undefined;
22
+ picture?: boolean | undefined;
20
23
  accept?: string | undefined;
21
24
  limit?: number | undefined;
22
25
  showRetry?: boolean | undefined;
23
26
  showCancel?: boolean | undefined;
24
27
  showUpload?: boolean | undefined;
28
+ disabled?: boolean | undefined;
25
29
  beforeUpload?: ((file: UploadFile) => Promise<any>) | undefined;
26
- fileList?: UploadFile[] | undefined;
30
+ afterSuccess?: ((file: UploadFile, response: any) => string) | undefined;
31
+ modelValue?: string | undefined;
27
32
  onProgress?: ((file: UploadFile, progress: number) => any) | undefined;
28
33
  onChange?: ((files: UploadFile[]) => any) | undefined;
29
34
  onError?: ((file: UploadFile, error: any) => any) | undefined;
30
35
  onSuccess?: ((file: UploadFile, response: any) => any) | undefined;
31
36
  onRemove?: ((file: UploadFile, files: UploadFile[]) => any) | undefined;
37
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
+ onPreview?: ((file: UploadFile) => any) | undefined;
32
39
  onExceed?: ((files: UploadFile[]) => any) | undefined;
33
- "onUpdate:fileList"?: ((value: UploadFile[]) => any) | undefined;
34
40
  } & (typeof globalThis extends {
35
41
  __VLS_PROPS_FALLBACK: infer P;
36
42
  } ? P : {});
37
43
  expose: (exposed: ShallowUnwrapRef<UploadExpose>) => void;
38
44
  attrs: any;
39
45
  slots: {
46
+ trigger?: (props: {}) => any;
47
+ } & {
40
48
  drag?: (props: {}) => any;
41
49
  } & {
42
50
  btn?: (props: {}) => any;
43
51
  };
44
- emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:fileList", value: UploadFile[]) => void);
52
+ emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "preview", file: UploadFile) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:modelValue", value: string) => void);
45
53
  }>) => VNode & {
46
54
  __ctx?: Awaited<typeof __VLS_setup>;
47
55
  }) & Plugin;
@@ -2,7 +2,8 @@ export interface UploadFile {
2
2
  uid: string;
3
3
  name: string;
4
4
  size: number;
5
- raw: File;
5
+ raw?: File;
6
+ url?: string;
6
7
  status?: "ready" | "uploading" | "success" | "error";
7
8
  percentage?: number;
8
9
  }
@@ -20,11 +21,11 @@ export interface RequestOptions {
20
21
  export interface UploadProps {
21
22
  /** 是否支持多选 */
22
23
  multiple?: boolean;
23
- /** 上传文件的请求头 */
24
+ /** 请求头 */
24
25
  headers?: Headers;
25
- /** 上传文件的请求体 */
26
+ /** 请求体 */
26
27
  data?: Record<string, any>;
27
- /** 上传文件的请求地址 */
28
+ /** 请求地址 */
28
29
  action?: string;
29
30
  /** 是否自动上传 */
30
31
  autoUpload?: boolean;
@@ -32,9 +33,11 @@ export interface UploadProps {
32
33
  drag?: boolean;
33
34
  /** 是否显示上传列表 */
34
35
  showList?: boolean;
35
- /** 上传文件的类型 */
36
+ /** 是否显示图片墙 */
37
+ picture?: boolean;
38
+ /** 文件的类型 */
36
39
  accept?: string;
37
- /** 上传文件的数量限制 */
40
+ /** 数量限制 */
38
41
  limit?: number;
39
42
  /** 是否显示重试按钮 */
40
43
  showRetry?: boolean;
@@ -42,21 +45,27 @@ export interface UploadProps {
42
45
  showCancel?: boolean;
43
46
  /** 是否显示上传按钮 */
44
47
  showUpload?: boolean;
48
+ /** 是否禁用 */
49
+ disabled?: boolean;
45
50
  /** 上传前的回调函数 */
46
51
  beforeUpload?: (file: UploadFile) => Promise<any>;
52
+ /** 上传成功后从响应中提取 URL,返回的 URL 会合并到 modelValue */
53
+ afterSuccess?: (file: UploadFile, response: any) => string;
47
54
  }
48
55
  export interface UploadEmits {
49
- /** 上传文件变化时 */
56
+ /** 文件变化时 */
50
57
  change: [files: UploadFile[]];
51
- /** 上传文件错误时 */
58
+ /** 文件错误时 */
52
59
  error: [file: UploadFile, error: any];
53
- /** 上传文件成功时 */
60
+ /** 文件成功时 */
54
61
  success: [file: UploadFile, response: any];
55
- /** 上传文件进度时 */
62
+ /** 文件进度时 */
56
63
  progress: [file: UploadFile, progress: number];
57
- /** 上传文件数量超过限制时 */
64
+ /** 文件数量超过限制时 */
58
65
  exceed: [files: UploadFile[]];
59
- /** 上传文件移除时 */
66
+ /** 文件预览时 */
67
+ preview: [file: UploadFile];
68
+ /** 文件移除时 */
60
69
  remove: [file: UploadFile, files: UploadFile[]];
61
70
  }
62
71
  export interface UploadSlots {
@@ -64,6 +73,8 @@ export interface UploadSlots {
64
73
  btn?: () => any;
65
74
  /** 拖拽区域 */
66
75
  drag?: () => any;
76
+ /** 照片墙触发块 */
77
+ trigger?: () => any;
67
78
  }
68
79
  export interface UploadExpose {
69
80
  /** 上传文件 */
@@ -1,6 +1,8 @@
1
1
  import { PublicProps, VNode } from 'vue';
2
2
  declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: PublicProps & __VLS_PrettifyLocal<{} & {
3
+ props: PublicProps & __VLS_PrettifyLocal<{
4
+ disabled?: boolean;
5
+ } & {
4
6
  onChange?: ((files: FileList) => any) | undefined;
5
7
  onClick?: (() => any) | undefined;
6
8
  }> & (typeof globalThis extends {
@@ -8,22 +8,32 @@ var g = p("<span></span>"), _ = p("<span>拖拽文件到此处上传", 2), v = p
8
8
  s("click");
9
9
  var y = /*@__PURE__*/ o({
10
10
  __name: "upload-drag",
11
+ props: { disabled: {
12
+ type: Boolean,
13
+ default: !1
14
+ } },
11
15
  emits: ["change", "click"],
12
16
  setup(o, { emit: s }) {
13
- let p = s, y = s, b = e("upload"), x = l(!1), S = () => {
14
- x.value = !0;
17
+ let p = o, y = s, b = e("upload"), x = l(!1), S = () => {
18
+ p.disabled || y("click");
15
19
  }, C = () => {
16
- x.value = !1;
17
- }, w = (e) => {
18
- x.value = !1, e.dataTransfer?.files && e.dataTransfer.files.length > 0 && y("change", e.dataTransfer.files);
19
- }, T = v(), E = n(T);
20
+ p.disabled || (x.value = !0);
21
+ }, w = () => {
22
+ p.disabled || (x.value = !1);
23
+ }, T = (e) => {
24
+ p.disabled || (x.value = !1, e.dataTransfer?.files && e.dataTransfer.files.length > 0 && y("change", e.dataTransfer.files));
25
+ }, E = v(), D = n(E);
20
26
  return u(() => {
21
27
  let e = m(b);
22
- d(T, [e.e("drag-wrapper"), e.is("dragover", x.value)]), d(E, [e.e("drag-content")]);
23
- }), f(E, null, 0), a("default", null, () => {
28
+ d(E, [
29
+ e.e("drag-wrapper"),
30
+ e.is("dragover", x.value),
31
+ e.is("disabled", o.disabled)
32
+ ]), d(D, [e.e("drag-content")]);
33
+ }), f(D, null, 0), a("default", null, () => {
24
34
  let e = g();
25
35
  return f(e, null, 0), r(m(t)), [e, _()];
26
- }), c(T, "dragover", h(S, ["prevent"])), c(T, "dragleave", h(C, ["prevent"])), c(T, "drop", h(w, ["prevent"])), T.$evtclick = i(() => p("click")), T;
36
+ }), c(E, "dragover", h(C, ["prevent"])), c(E, "dragleave", h(w, ["prevent"])), c(E, "drop", h(T, ["prevent"])), E.$evtclick = i(S), E;
27
37
  }
28
38
  });
29
39
  //#endregion
@@ -2,26 +2,29 @@ import { UploadExpose, UploadFile, UploadProps } from './types';
2
2
  import { PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
3
  declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: PublicProps & __VLS_PrettifyLocal<(UploadProps & {
5
- fileList?: UploadFile[];
5
+ modelValue?: string;
6
6
  }) & {
7
7
  onProgress?: ((file: UploadFile, progress: number) => any) | undefined;
8
8
  onChange?: ((files: UploadFile[]) => any) | undefined;
9
9
  onError?: ((file: UploadFile, error: any) => any) | undefined;
10
10
  onSuccess?: ((file: UploadFile, response: any) => any) | undefined;
11
11
  onRemove?: ((file: UploadFile, files: UploadFile[]) => any) | undefined;
12
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
13
+ onPreview?: ((file: UploadFile) => any) | undefined;
12
14
  onExceed?: ((files: UploadFile[]) => any) | undefined;
13
- "onUpdate:fileList"?: ((value: UploadFile[]) => any) | undefined;
14
15
  }> & (typeof globalThis extends {
15
16
  __VLS_PROPS_FALLBACK: infer P;
16
17
  } ? P : {});
17
18
  expose: (exposed: ShallowUnwrapRef<UploadExpose>) => void;
18
19
  attrs: any;
19
20
  slots: {
21
+ trigger?: (props: {}) => any;
22
+ } & {
20
23
  drag?: (props: {}) => any;
21
24
  } & {
22
25
  btn?: (props: {}) => any;
23
26
  };
24
- emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:fileList", value: UploadFile[]) => void);
27
+ emit: (((evt: "progress", file: UploadFile, progress: number) => void) & ((evt: "change", files: UploadFile[]) => void) & ((evt: "error", file: UploadFile, error: any) => void) & ((evt: "success", file: UploadFile, response: any) => void) & ((evt: "remove", file: UploadFile, files: UploadFile[]) => void) & ((evt: "preview", file: UploadFile) => void) & ((evt: "exceed", files: UploadFile[]) => void)) & ((event: "update:modelValue", value: string) => void);
25
28
  }>) => VNode & {
26
29
  __ctx?: Awaited<typeof __VLS_setup>;
27
30
  };
@@ -4,21 +4,25 @@ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
4
4
  import "../../../hooks/index.mjs";
5
5
  import n from "../../../icons/src/close.vue.mjs";
6
6
  import r from "../../../icons/src/delete.vue.mjs";
7
- import ee from "../../../icons/src/refresh-left.vue.mjs";
8
- import i from "../../../icons/src/upload.vue.mjs";
7
+ import i from "../../../icons/src/empty.vue.mjs";
8
+ import a from "../../../icons/src/plus.vue.mjs";
9
+ import o from "../../../icons/src/refresh-left.vue.mjs";
10
+ import s from "../../../icons/src/upload.vue.mjs";
11
+ import c from "../../../icons/src/zoom-in.vue.mjs";
9
12
  import "../../../icons/index.mjs";
10
- import { SButton as a } from "../button/index.mjs";
11
- import { SProgress as o } from "../progress/index.mjs";
12
- import { httpRequest as s } from "./request.mjs";
13
- import c from "./upload-drag.vue.mjs";
14
- import { child as l, computed as u, createComponent as d, createFor as f, createIf as p, createInvoker as m, createSlot as h, createTemplateRefSetter as te, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, on as b, onMounted as x, onUnmounted as S, renderEffect as C, setClass as w, setInsertionState as T, setProp as E, setText as ne, template as D, toDisplayString as re, txt as ie, unref as O, useModel as k, useTemplateRef as A } from "vue";
13
+ import { SButton as l } from "../button/index.mjs";
14
+ import { SImagePreview as ee } from "../image/index.mjs";
15
+ import { SProgress as u } from "../progress/index.mjs";
16
+ import { httpRequest as d } from "./request.mjs";
17
+ import te from "./upload-drag.vue.mjs";
18
+ import { child as f, computed as p, createComponent as m, createFor as h, createIf as g, createInvoker as _, createSlot as v, createTemplateRefSetter as ne, defineVaporComponent as y, delegateEvents as b, mergeModels as x, next as S, on as re, onUnmounted as ie, ref as C, renderEffect as w, setClass as T, setInsertionState as E, setProp as D, setText as ae, template as O, toDisplayString as oe, txt as se, unref as k, useModel as A, useTemplateRef as ce } from "vue";
15
19
  //#region ../components/src/upload/upload.vue?vue&type=script&setup=true&vapor=true&lang.ts
16
- var j = D("<div>"), M = D("<div><div> </div><div></div><div><div>"), N = D("<div><div><input type=file></div>", 1);
17
- _("click");
18
- var P = /*@__PURE__*/ g({
20
+ var le = O("<img>"), j = O("<div>"), ue = O("<div></div>"), de = O("<div><div> </div><div></div><div>"), fe = O("<div><input type=file>", 1);
21
+ b("click");
22
+ var M = /*@__PURE__*/ y({
19
23
  name: "SUpload",
20
24
  __name: "upload",
21
- props: /*@__PURE__*/ v({
25
+ props: /*@__PURE__*/ x({
22
26
  multiple: { type: Boolean },
23
27
  headers: {},
24
28
  data: {},
@@ -29,6 +33,7 @@ var P = /*@__PURE__*/ g({
29
33
  type: Boolean,
30
34
  default: !0
31
35
  },
36
+ picture: { type: Boolean },
32
37
  accept: {},
33
38
  limit: {},
34
39
  showRetry: {
@@ -43,32 +48,44 @@ var P = /*@__PURE__*/ g({
43
48
  type: Boolean,
44
49
  default: !0
45
50
  },
46
- beforeUpload: {}
51
+ disabled: { type: Boolean },
52
+ beforeUpload: {},
53
+ afterSuccess: {}
47
54
  }, {
48
- fileList: { default: () => [] },
49
- fileListModifiers: {}
55
+ modelValue: { default: "" },
56
+ modelModifiers: {}
50
57
  }),
51
- emits: /*@__PURE__*/ v([
58
+ emits: /*@__PURE__*/ x([
52
59
  "change",
53
60
  "error",
54
61
  "success",
55
62
  "progress",
56
63
  "exceed",
64
+ "preview",
57
65
  "remove"
58
- ], ["update:fileList"]),
59
- setup(g, { expose: _, emit: v }) {
60
- let D = g, P = v, F = t("upload"), I = A("inputRef"), L = A("contentBtnRef"), R = null, z = k(g, "fileList"), B = u(() => z.value.some((e) => e.status === "ready" || e.status === "error")), V = /* @__PURE__ */ new Map(), H = () => {
61
- I.value?.click();
62
- }, U = (t) => {
66
+ ], ["update:modelValue"]),
67
+ setup(y, { expose: b, emit: x }) {
68
+ let O = y, M = x, N = t("upload"), P = ce("inputRef"), F = C([]), I = A(y, "modelValue"), L = (e) => e ? e.split(",").map((e) => e.trim()).filter(Boolean) : [], R = p(() => L(I.value).map((e, t) => ({
69
+ uid: `model-${t}-${e}`,
70
+ name: decodeURIComponent(e.split("/").pop()?.split("?")[0] || e),
71
+ size: 0,
72
+ url: e,
73
+ status: "success",
74
+ percentage: 100
75
+ }))), z = p(() => [...F.value, ...R.value]), B = p(() => F.value.length + R.value.length), pe = p(() => !(O.limit && B.value >= O.limit)), V = C(!1), H = C(""), U = /* @__PURE__ */ new Map(), me = (e) => e.type.startsWith("image/"), W = (e) => {
76
+ e && e.startsWith("blob:") && URL.revokeObjectURL(e);
77
+ }, G = () => {
78
+ O.disabled || P.value?.click();
79
+ }, K = (t) => {
63
80
  let n = [];
64
81
  for (let e of t) n.push(e);
65
- if (D.limit) {
66
- let t = D.limit - z.value.length;
82
+ if (O.limit) {
83
+ let t = O.limit - B.value;
67
84
  if (t <= 0) {
68
- P("exceed", z.value);
85
+ M("exceed", z.value);
69
86
  return;
70
87
  }
71
- n.length > t && (P("exceed", n.slice(t).map((t) => ({
88
+ n.length > t && (M("exceed", n.slice(t).map((t) => ({
72
89
  uid: e(8),
73
90
  name: t.name,
74
91
  size: t.size,
@@ -83,113 +100,177 @@ var P = /*@__PURE__*/ g({
83
100
  name: t.name,
84
101
  size: t.size,
85
102
  raw: t,
103
+ url: me(t) ? URL.createObjectURL(t) : void 0,
86
104
  status: "ready",
87
105
  percentage: 0
88
106
  };
89
- z.value = [...z.value, n];
107
+ F.value = [...F.value, n];
90
108
  }
91
- P("change", z.value), D.autoUpload && Y();
92
- }, W = (e) => {
93
- let t = e.target.files;
94
- t && U(t);
95
- }, G = (e) => {
96
- U(e);
97
- }, K = (e) => {
98
- let t = z.value.findIndex((t) => t.uid === e.uid);
99
- t !== -1 && (z.value = z.value.toSpliced(t, 1), P("remove", e, z.value), P("change", z.value));
109
+ M("change", z.value), O.autoUpload && Z();
110
+ }, he = (e) => {
111
+ let t = e.target, n = t.files;
112
+ n && K(n), t.value = "";
113
+ }, ge = (e) => {
114
+ O.disabled || K(e);
100
115
  }, q = (e) => {
101
- Y(e);
102
- }, ae = (e) => {
103
- let t = V.get(e.uid);
104
- t && (t.abort(), V.delete(e.uid), J(e.uid, { status: "error" }));
105
- }, J = (e, t) => {
106
- let n = z.value.findIndex((t) => t.uid === e);
107
- n !== -1 && (z.value[n] = {
108
- ...z.value[n],
116
+ if (e.uid.startsWith("model-")) {
117
+ I.value = L(I.value).filter((t) => t !== e.url).join(","), M("remove", e, z.value), M("change", z.value);
118
+ return;
119
+ }
120
+ let t = F.value.findIndex((t) => t.uid === e.uid);
121
+ t !== -1 && (W(e.url), F.value = F.value.toSpliced(t, 1), M("remove", e, z.value), M("change", z.value));
122
+ }, J = (e) => {
123
+ Z(e);
124
+ }, _e = (e) => {
125
+ let t = U.get(e.uid);
126
+ t && (t.abort(), U.delete(e.uid), X(e.uid, { status: "error" }));
127
+ }, Y = (e) => {
128
+ H.value = e.url || "", V.value = !0, M("preview", e);
129
+ }, X = (e, t) => {
130
+ let n = F.value.findIndex((t) => t.uid === e);
131
+ n !== -1 && (F.value[n] = {
132
+ ...F.value[n],
109
133
  ...t
110
- }, z.value = [...z.value]);
111
- }, Y = async (e) => {
112
- I.value.value = "";
134
+ }, F.value = [...F.value]);
135
+ }, ve = (e) => {
136
+ if (!e) return;
137
+ let t = L(I.value);
138
+ t.includes(e) || (t.push(e), I.value = t.join(","));
139
+ }, Z = async (e) => {
113
140
  let t = async (e) => {
114
- if (e.status === "uploading") return;
141
+ if (e.status === "uploading" || !e.raw) return;
115
142
  try {
116
- await D.beforeUpload?.(e);
143
+ await O.beforeUpload?.(e);
117
144
  } catch {
118
145
  return;
119
146
  }
120
- J(e.uid, {
147
+ X(e.uid, {
121
148
  status: "uploading",
122
149
  percentage: 0
123
150
  });
124
- let t = s({
151
+ let t = d({
125
152
  method: "POST",
126
153
  file: e.raw,
127
154
  name: e.name,
128
- action: D.action,
129
- headers: D.headers,
130
- data: D.data,
155
+ action: O.action,
156
+ headers: O.headers,
157
+ data: O.data,
131
158
  onProgress: (t) => {
132
- J(e.uid, { percentage: t }), P("progress", e, t);
159
+ X(e.uid, { percentage: t }), M("progress", e, t);
133
160
  },
134
161
  onSuccess: (t) => {
135
- J(e.uid, {
136
- status: "success",
137
- percentage: 100
138
- }), V.delete(e.uid), P("success", e, t);
162
+ ve(O.afterSuccess?.(e, t) ?? "");
163
+ let n = F.value.findIndex((t) => t.uid === e.uid);
164
+ n !== -1 && (W(e.url), F.value = F.value.toSpliced(n, 1)), U.delete(e.uid), M("success", e, t);
139
165
  },
140
166
  onError: (t) => {
141
- J(e.uid, { status: "error" }), V.delete(e.uid), P("error", e, t);
167
+ X(e.uid, { status: "error" }), U.delete(e.uid), M("error", e, t);
142
168
  }
143
169
  });
144
- V.set(e.uid, t);
170
+ U.set(e.uid, t);
145
171
  };
146
172
  if (e) {
147
- let n = z.value.find((t) => t.uid === e.uid);
173
+ let n = F.value.find((t) => t.uid === e.uid);
148
174
  n && await t(n);
149
- } else for (let e of z.value) e.status !== "success" && await t(e);
175
+ } else for (let e of F.value) e.status !== "success" && await t(e);
150
176
  };
151
- x(() => {
152
- let e = L.value;
153
- e && (R = e.querySelector("button:first-of-type"), R && R.addEventListener("click", H));
154
- }), S(() => {
155
- R &&= (R.removeEventListener("click", H), null), V.forEach((e) => e.abort()), V.clear();
156
- }), _({ upload: Y });
157
- let X = te(), Z = N(), Q = l(Z), $ = l(Q);
158
- return b($, "change", W), X($, I, null, "inputRef"), C(() => {
159
- let e = O(F);
160
- w(Z, [e.b()]), w(Q, [e.e("content")]), w($, [e.e("inner")]), E($, "multiple", g.multiple), E($, "accept", g.accept);
161
- }), T(Q, null, 1), p(() => g.drag, () => d(c, {
162
- onClick: () => H,
163
- onChange: () => G
164
- }, () => h("drag", null, null, 4)), () => {
165
- let e = j();
166
- return C(() => w(e, [O(F).e("btn")])), T(e, null, 0), h("btn", null, () => d(O(a), {
167
- type: "primary",
168
- label: "选择文件"
169
- })), X(e, L, null, "contentBtnRef"), e;
170
- }, 261), T(Z, null, 1), p(() => g.showList && z.value.length > 0, () => {
177
+ C(!1), ie(() => {
178
+ U.forEach((e) => e.abort()), U.clear(), F.value.forEach((e) => W(e.url));
179
+ }), b({ upload: Z });
180
+ let ye = ne(), Q = fe(), $ = f(Q);
181
+ return re($, "change", he), ye($, P, null, "inputRef"), w(() => {
182
+ let e = k(N);
183
+ T(Q, [
184
+ e.b(),
185
+ e.is("picture", y.picture),
186
+ e.is("disabled", O.disabled)
187
+ ]), T($, [e.e("inner")]), D($, "multiple", y.multiple), D($, "accept", y.accept);
188
+ }), E(Q, null, 1), g(() => y.picture, () => {
171
189
  let e = j();
172
- return C(() => w(e, [O(F).e("list")])), T(e, null, 0), f(() => z.value, (e) => {
173
- let t = M(), a = l(t), s = y(a, 1), c = y(s, 2), u = l(c, 3), f = ie(a);
174
- return C(() => {
175
- let n = O(F), r = e.value;
176
- w(t, [n.e("item"), n.is(r.status)]), w(a, [n.e("name")]), ne(f, re(r.name)), w(s, [n.e("progress")]);
177
- }), T(s, null, 0), p(() => e.value.percentage && e.value.status === "uploading", () => d(O(o), {
178
- percent: () => parseInt((e.value.percentage / 100).toFixed(1)),
179
- type: "primary"
180
- })), C(() => w(c, [O(F).e("actions")])), T(c, 0, 0), p(() => g.showUpload && B.value, () => {
181
- let t = j();
182
- return C(() => w(t, [O(F).e("action")])), T(t, null, 0), d(O(i)), t.$evtclick = m(() => Y(e.value)), t;
183
- }), T(c, 0, 1), p(() => g.showRetry && e.value.status === "error", () => {
190
+ return w(() => T(e, [k(N).e("picture-wall")])), E(e, null, 0), h(() => z.value, (e) => {
191
+ let t = j();
192
+ return w(() => {
193
+ let n = k(N);
194
+ T(t, [n.e("picture-item"), n.is(e.value.status)]);
195
+ }), E(t, null, 0), g(() => e.value.url, () => {
196
+ let t = le();
197
+ return w(() => {
198
+ let n = e.value;
199
+ D(t, "src", n.url), T(t, [k(N).e("picture-thumb")]), D(t, "alt", n.name);
200
+ }), t;
201
+ }, () => {
202
+ let e = j();
203
+ return w(() => T(e, [k(N).e("picture-placeholder")])), E(e, null, 0), m(k(i)), e;
204
+ }, 261), E(t, null, 1), g(() => e.value.status === "uploading", () => {
184
205
  let t = j();
185
- return C(() => w(t, [O(F).e("action")])), T(t, null, 0), d(O(ee)), t.$evtclick = m(() => q(e.value)), t;
186
- }), T(c, 0, 2), p(() => g.showCancel && e.value.status === "uploading", () => {
206
+ return w(() => T(t, [k(N).e("picture-loading")])), E(t, null, 0), m(k(u), {
207
+ percent: () => parseInt((e.value.percentage / 100).toFixed(1)),
208
+ type: "primary"
209
+ }), t;
210
+ }, () => {
187
211
  let t = j();
188
- return C(() => w(t, [O(F).e("action")])), T(t, null, 0), d(O(n)), t.$evtclick = m(() => ae(e.value)), t;
189
- }), C(() => w(u, [O(F).e("action")])), T(u, null, 0), d(O(r)), u.$evtclick = m(() => K(e.value)), t;
190
- }, (e) => e.uid, 9), e;
191
- }), Z;
212
+ return w(() => T(t, [k(N).e("picture-mask")])), E(t, null, 0), g(() => !O.disabled && !y.autoUpload && y.showUpload && (e.value.status === "ready" || e.value.status === "error"), () => {
213
+ let t = j();
214
+ return w(() => T(t, [k(N).e("picture-action")])), E(t, null, 0), m(k(s)), t.$evtclick = _(() => Z(e.value)), t;
215
+ }), E(t, null, 1), g(() => e.value.url, () => {
216
+ let t = j();
217
+ return w(() => T(t, [k(N).e("picture-action")])), E(t, null, 0), m(k(c)), t.$evtclick = _(() => Y(e.value)), t;
218
+ }), E(t, null, 2), g(() => !O.disabled && y.showRetry && e.value.status === "error", () => {
219
+ let t = j();
220
+ return w(() => T(t, [k(N).e("picture-action")])), E(t, null, 0), m(k(o)), t.$evtclick = _(() => J(e.value)), t;
221
+ }), E(t, null, 3), g(() => !O.disabled, () => {
222
+ let t = j();
223
+ return w(() => T(t, [k(N).e("picture-action")])), E(t, null, 0), m(k(r)), t.$evtclick = _(() => q(e.value)), t;
224
+ }), t;
225
+ }, 517), t;
226
+ }, (e) => e.uid, 8), E(e, null, 1), g(() => pe.value, () => {
227
+ let e = j();
228
+ return w(() => T(e, [k(N).e("picture-trigger")])), E(e, null, 0), v("trigger", null, () => m(k(a))), e.$evtclick = _(G), e;
229
+ }), e;
230
+ }, () => {
231
+ let e = ue();
232
+ return w(() => T(e, [k(N).e("content")])), E(e, null, 0), g(() => y.drag, () => m(te, {
233
+ disabled: () => O.disabled,
234
+ onClick: () => G,
235
+ onChange: () => ge
236
+ }, () => v("drag", null, null, 4)), () => {
237
+ let e = j();
238
+ return w(() => T(e, [k(N).e("btn")])), E(e, null, 0), v("btn", null, () => m(k(l), {
239
+ type: "primary",
240
+ label: "选择文件",
241
+ disabled: () => O.disabled
242
+ })), e.$evtclick = _(G), e;
243
+ }, 2309), [e, g(() => y.showList && z.value.length > 0, () => {
244
+ let e = j();
245
+ return w(() => T(e, [k(N).e("list")])), E(e, null, 0), h(() => z.value, (e) => {
246
+ let t = de(), i = f(t), a = S(i, 1), c = S(a, 2), l = se(i);
247
+ return w(() => {
248
+ let n = k(N), r = e.value;
249
+ T(t, [n.e("item"), n.is(r.status)]), T(i, [n.e("name")]), ae(l, oe(r.name)), T(a, [n.e("progress")]);
250
+ }), E(a, null, 0), g(() => e.value.percentage && e.value.status === "uploading", () => m(k(u), {
251
+ percent: () => parseInt((e.value.percentage / 100).toFixed(1)),
252
+ type: "primary"
253
+ })), w(() => T(c, [k(N).e("actions")])), E(c, null, 0), g(() => !O.disabled && !y.autoUpload && y.showUpload && (e.value.status === "ready" || e.value.status === "error"), () => {
254
+ let t = j();
255
+ return w(() => T(t, [k(N).e("action")])), E(t, null, 0), m(k(s)), t.$evtclick = _(() => Z(e.value)), t;
256
+ }), E(c, null, 1), g(() => !O.disabled && y.showRetry && e.value.status === "error", () => {
257
+ let t = j();
258
+ return w(() => T(t, [k(N).e("action")])), E(t, null, 0), m(k(o)), t.$evtclick = _(() => J(e.value)), t;
259
+ }), E(c, null, 2), g(() => !O.disabled && y.showCancel && e.value.status === "uploading", () => {
260
+ let t = j();
261
+ return w(() => T(t, [k(N).e("action")])), E(t, null, 0), m(k(n)), t.$evtclick = _(() => _e(e.value)), t;
262
+ }), E(c, null, 3), g(() => !O.disabled, () => {
263
+ let t = j();
264
+ return w(() => T(t, [k(N).e("action")])), E(t, null, 0), m(k(r)), t.$evtclick = _(() => q(e.value)), t;
265
+ }), t;
266
+ }, (e) => e.uid, 9), e;
267
+ })];
268
+ }, 2057), E(Q, null, 2), m(k(ee), {
269
+ modelValue: () => V.value,
270
+ "onUpdate:modelValue": () => (e) => V.value = e,
271
+ src: () => H.value
272
+ }), Q;
192
273
  }
193
274
  });
194
275
  //#endregion
195
- export { P as default };
276
+ export { M as default };
@@ -7,6 +7,30 @@
7
7
  display: inline-flex;
8
8
  flex-direction: column;
9
9
  gap: 12px;
10
+
11
+ @include when(disabled) {
12
+ @include be(upload, picture-trigger) {
13
+ cursor: not-allowed;
14
+ color: getCssVar("color", "text-4");
15
+ &:hover {
16
+ border-color: getCssVar("color", "fill-3");
17
+ color: getCssVar("color", "text-4");
18
+ }
19
+ }
20
+ @include be(upload, drag-wrapper) {
21
+ cursor: not-allowed;
22
+ &:hover {
23
+ background-color: getCssVar("color", "fill-2");
24
+ }
25
+ @include when(dragover) {
26
+ border: 1px dashed getCssVar("color", "fill-3");
27
+ }
28
+ }
29
+ @include be(upload, drag-content) {
30
+ cursor: not-allowed;
31
+ }
32
+ }
33
+
10
34
  @include e(content) {
11
35
  display: flex;
12
36
  flex-direction: column;
@@ -80,4 +104,97 @@
80
104
  gap: 12px;
81
105
  cursor: pointer;
82
106
  }
107
+ @include e(picture-wall) {
108
+ display: flex;
109
+ flex-wrap: wrap;
110
+ gap: 8px;
111
+ }
112
+ @include e(picture-item) {
113
+ position: relative;
114
+ width: 104px;
115
+ height: 104px;
116
+ box-sizing: border-box;
117
+ border-radius: getCssVar("radius", "medium");
118
+ overflow: hidden;
119
+ border: 1px solid getCssVar("color", "fill-3");
120
+ background-color: getCssVar("color", "fill-2");
121
+ @include when(error) {
122
+ border-color: getCssVar("color", "danger-6");
123
+ }
124
+ &:hover {
125
+ @include within-be(upload, picture-mask) {
126
+ opacity: 1;
127
+ }
128
+ }
129
+ }
130
+ @include e(picture-thumb) {
131
+ width: 100%;
132
+ height: 100%;
133
+ object-fit: cover;
134
+ display: block;
135
+ }
136
+ @include e(picture-placeholder) {
137
+ width: 100%;
138
+ height: 100%;
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ color: getCssVar("color", "text-3");
143
+ font-size: 32px;
144
+ }
145
+ @include e(picture-loading) {
146
+ position: absolute;
147
+ inset: 0;
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ padding: 8px;
152
+ box-sizing: border-box;
153
+ background-color: rgba(0, 0, 0, 0.45);
154
+ }
155
+ @include e(picture-mask) {
156
+ position: absolute;
157
+ inset: 0;
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: center;
161
+ gap: 8px;
162
+ background-color: rgba(0, 0, 0, 0.5);
163
+ opacity: 0;
164
+ transition: opacity 0.2s getCssVar("bezier", "1");
165
+ }
166
+ @include e(picture-action) {
167
+ width: 26px;
168
+ height: 26px;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ color: #fff;
173
+ font-size: 18px;
174
+ cursor: pointer;
175
+ border-radius: getCssVar("radius", "small");
176
+ &:hover {
177
+ background-color: rgba(255, 255, 255, 0.2);
178
+ }
179
+ }
180
+ @include e(picture-trigger) {
181
+ width: 104px;
182
+ height: 104px;
183
+ box-sizing: border-box;
184
+ display: flex;
185
+ align-items: center;
186
+ justify-content: center;
187
+ font-size: 24px;
188
+ color: getCssVar("color", "text-3");
189
+ background-color: getCssVar("color", "fill-2");
190
+ border: 1px dashed getCssVar("color", "fill-3");
191
+ border-radius: getCssVar("radius", "medium");
192
+ cursor: pointer;
193
+ transition:
194
+ border-color 0.2s getCssVar("bezier", "1"),
195
+ color 0.2s getCssVar("bezier", "1");
196
+ &:hover {
197
+ background-color: getCssVar("color", "fill-3");
198
+ }
199
+ }
83
200
  }
@@ -2702,35 +2702,38 @@
2702
2702
  "description": "弹出层属性 [PopoverProps](/components/other/popover#popover-props)"
2703
2703
  },
2704
2704
  "s-upload/change": {
2705
- "description": "上传文件变化时"
2705
+ "description": "文件变化时"
2706
2706
  },
2707
2707
  "s-upload/error": {
2708
- "description": "上传文件错误时"
2708
+ "description": "文件错误时"
2709
2709
  },
2710
2710
  "s-upload/success": {
2711
- "description": "上传文件成功时"
2711
+ "description": "文件成功时"
2712
2712
  },
2713
2713
  "s-upload/progress": {
2714
- "description": "上传文件进度时"
2714
+ "description": "文件进度时"
2715
2715
  },
2716
2716
  "s-upload/exceed": {
2717
- "description": "上传文件数量超过限制时"
2717
+ "description": "文件数量超过限制时"
2718
+ },
2719
+ "s-upload/preview": {
2720
+ "description": "文件预览时"
2718
2721
  },
2719
2722
  "s-upload/remove": {
2720
- "description": "上传文件移除时"
2723
+ "description": "文件移除时"
2721
2724
  },
2722
2725
  "s-upload/multiple": {
2723
2726
  "description": "是否支持多选",
2724
2727
  "type": "boolean"
2725
2728
  },
2726
2729
  "s-upload/headers": {
2727
- "description": "上传文件的请求头"
2730
+ "description": "请求头"
2728
2731
  },
2729
2732
  "s-upload/data": {
2730
- "description": "上传文件的请求体"
2733
+ "description": "请求体"
2731
2734
  },
2732
2735
  "s-upload/action": {
2733
- "description": "上传文件的请求地址",
2736
+ "description": "请求地址",
2734
2737
  "type": "string"
2735
2738
  },
2736
2739
  "s-upload/autoUpload": {
@@ -2745,12 +2748,16 @@
2745
2748
  "description": "是否显示上传列表",
2746
2749
  "type": "boolean"
2747
2750
  },
2751
+ "s-upload/picture": {
2752
+ "description": "是否显示图片墙",
2753
+ "type": "boolean"
2754
+ },
2748
2755
  "s-upload/accept": {
2749
- "description": "上传文件的类型",
2756
+ "description": "文件的类型",
2750
2757
  "type": "string"
2751
2758
  },
2752
2759
  "s-upload/limit": {
2753
- "description": "上传文件的数量限制",
2760
+ "description": "数量限制",
2754
2761
  "type": "number"
2755
2762
  },
2756
2763
  "s-upload/showRetry": {
@@ -2765,9 +2772,16 @@
2765
2772
  "description": "是否显示上传按钮",
2766
2773
  "type": "boolean"
2767
2774
  },
2775
+ "s-upload/disabled": {
2776
+ "description": "是否禁用",
2777
+ "type": "boolean"
2778
+ },
2768
2779
  "s-upload/beforeUpload": {
2769
2780
  "description": "上传前的回调函数"
2770
2781
  },
2782
+ "s-upload/afterSuccess": {
2783
+ "description": "上传成功后从响应中提取 URL,返回的 URL 会合并到 modelValue"
2784
+ },
2771
2785
  "s-waterfall/data": {
2772
2786
  "description": "列表数据"
2773
2787
  },
@@ -1126,6 +1126,7 @@
1126
1126
  "success",
1127
1127
  "progress",
1128
1128
  "exceed",
1129
+ "preview",
1129
1130
  "remove",
1130
1131
  "multiple",
1131
1132
  "headers",
@@ -1134,12 +1135,15 @@
1134
1135
  "autoUpload",
1135
1136
  "drag",
1136
1137
  "showList",
1138
+ "picture",
1137
1139
  "accept",
1138
1140
  "limit",
1139
1141
  "showRetry",
1140
1142
  "showCancel",
1141
1143
  "showUpload",
1142
- "beforeUpload"
1144
+ "disabled",
1145
+ "beforeUpload",
1146
+ "afterSuccess"
1143
1147
  ]
1144
1148
  },
1145
1149
  "s-waterfall": {
@@ -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.14.1",
5
+ "version": "0.14.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -6925,7 +6925,7 @@
6925
6925
  },
6926
6926
  {
6927
6927
  "name": "headers",
6928
- "description": "上传文件的请求头",
6928
+ "description": "请求头",
6929
6929
  "value": {
6930
6930
  "type": "Headers",
6931
6931
  "kind": "expression"
@@ -6933,7 +6933,7 @@
6933
6933
  },
6934
6934
  {
6935
6935
  "name": "data",
6936
- "description": "上传文件的请求体",
6936
+ "description": "请求体",
6937
6937
  "value": {
6938
6938
  "type": "Record<string, any>",
6939
6939
  "kind": "expression"
@@ -6941,7 +6941,7 @@
6941
6941
  },
6942
6942
  {
6943
6943
  "name": "action",
6944
- "description": "上传文件的请求地址",
6944
+ "description": "请求地址",
6945
6945
  "value": {
6946
6946
  "type": "string",
6947
6947
  "kind": "expression"
@@ -6971,9 +6971,17 @@
6971
6971
  "kind": "expression"
6972
6972
  }
6973
6973
  },
6974
+ {
6975
+ "name": "picture",
6976
+ "description": "是否显示图片墙",
6977
+ "value": {
6978
+ "type": "boolean",
6979
+ "kind": "expression"
6980
+ }
6981
+ },
6974
6982
  {
6975
6983
  "name": "accept",
6976
- "description": "上传文件的类型",
6984
+ "description": "文件的类型",
6977
6985
  "value": {
6978
6986
  "type": "string",
6979
6987
  "kind": "expression"
@@ -6981,7 +6989,7 @@
6981
6989
  },
6982
6990
  {
6983
6991
  "name": "limit",
6984
- "description": "上传文件的数量限制",
6992
+ "description": "数量限制",
6985
6993
  "value": {
6986
6994
  "type": "number",
6987
6995
  "kind": "expression"
@@ -7011,6 +7019,14 @@
7011
7019
  "kind": "expression"
7012
7020
  }
7013
7021
  },
7022
+ {
7023
+ "name": "disabled",
7024
+ "description": "是否禁用",
7025
+ "value": {
7026
+ "type": "boolean",
7027
+ "kind": "expression"
7028
+ }
7029
+ },
7014
7030
  {
7015
7031
  "name": "beforeUpload",
7016
7032
  "description": "上传前的回调函数",
@@ -7018,32 +7034,44 @@
7018
7034
  "type": "(file: UploadFile) => Promise<any>",
7019
7035
  "kind": "expression"
7020
7036
  }
7037
+ },
7038
+ {
7039
+ "name": "afterSuccess",
7040
+ "description": "上传成功后从响应中提取 URL,返回的 URL 会合并到 modelValue",
7041
+ "value": {
7042
+ "type": "(file: UploadFile, response: any) => string",
7043
+ "kind": "expression"
7044
+ }
7021
7045
  }
7022
7046
  ],
7023
7047
  "events": [
7024
7048
  {
7025
7049
  "name": "change",
7026
- "description": "上传文件变化时"
7050
+ "description": "文件变化时"
7027
7051
  },
7028
7052
  {
7029
7053
  "name": "error",
7030
- "description": "上传文件错误时"
7054
+ "description": "文件错误时"
7031
7055
  },
7032
7056
  {
7033
7057
  "name": "success",
7034
- "description": "上传文件成功时"
7058
+ "description": "文件成功时"
7035
7059
  },
7036
7060
  {
7037
7061
  "name": "progress",
7038
- "description": "上传文件进度时"
7062
+ "description": "文件进度时"
7039
7063
  },
7040
7064
  {
7041
7065
  "name": "exceed",
7042
- "description": "上传文件数量超过限制时"
7066
+ "description": "文件数量超过限制时"
7067
+ },
7068
+ {
7069
+ "name": "preview",
7070
+ "description": "文件预览时"
7043
7071
  },
7044
7072
  {
7045
7073
  "name": "remove",
7046
- "description": "上传文件移除时"
7074
+ "description": "文件移除时"
7047
7075
  }
7048
7076
  ],
7049
7077
  "slots": [
@@ -7054,6 +7082,10 @@
7054
7082
  {
7055
7083
  "name": "drag",
7056
7084
  "description": "拖拽区域"
7085
+ },
7086
+ {
7087
+ "name": "trigger",
7088
+ "description": "照片墙触发块"
7057
7089
  }
7058
7090
  ]
7059
7091
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "savor-ui",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "description": "A Vue3 Components Library",
5
5
  "keywords": [
6
6
  "component library",