sand-components-vben 2.7.103 → 2.7.104

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.
@@ -37002,85 +37002,87 @@ const q9e = /* @__PURE__ */ uB(Y9e), V9e = { class: "group-box" }, H9e = {
37002
37002
  default: !1
37003
37003
  }
37004
37004
  },
37005
- emits: ["update:value", "update:previewPath"],
37006
- setup(e, { emit: t }) {
37007
- const n = t, r = na("handleGetExtraData"), i = e, o = jt({
37005
+ emits: ["update:value", "update:previewPath", "change"],
37006
+ setup(e, { expose: t, emit: n }) {
37007
+ const r = n, i = na("handleGetExtraData"), o = e, a = jt({
37008
37008
  fileList: [],
37009
37009
  flag: !1
37010
37010
  });
37011
- let { fileList: a, flag: s } = mn(o);
37012
- const l = (p) => {
37013
- a.value.splice(p, 1);
37014
- let f = a.value.map((g) => g.id).join(",");
37015
- n("update:value", f);
37016
- }, c = ue(() => i.value);
37017
- it(c, (p) => {
37018
- if (!p) {
37019
- a.value = [];
37011
+ let { fileList: s, flag: l } = mn(a);
37012
+ const c = (f) => {
37013
+ s.value.splice(f, 1);
37014
+ let g = s.value.map((h) => h.id).join(",");
37015
+ r("update:value", g), r("change", s.value);
37016
+ }, u = ue(() => o.value);
37017
+ it(u, (f) => {
37018
+ if (!f) {
37019
+ s.value = [];
37020
37020
  return;
37021
37021
  }
37022
37022
  });
37023
- const u = (p) => {
37024
- a.value.push(...p);
37025
- let f = a.value.map((g) => g.id).join(",");
37026
- n("update:value", f), r && r(p);
37023
+ const d = (f) => {
37024
+ s.value.push(...f);
37025
+ let g = s.value.map((h) => h.id).join(",");
37026
+ r("update:value", g), r("change", s.value), i && i(f);
37027
37027
  };
37028
37028
  it(
37029
- c,
37030
- async (p) => {
37031
- if (s.value) return;
37032
- if (!p) {
37033
- a.value = [];
37029
+ u,
37030
+ async (f) => {
37031
+ if (l.value) return;
37032
+ if (!f) {
37033
+ s.value = [];
37034
37034
  return;
37035
37035
  }
37036
- const g = await Eae({ fileIds: p });
37037
- a.value = g, s.value = !0;
37036
+ const h = await Eae({ fileIds: f });
37037
+ s.value = h, l.value = !0;
37038
37038
  },
37039
37039
  {
37040
37040
  immediate: !0
37041
37041
  }
37042
37042
  );
37043
- const d = (p) => {
37044
- eQe({ url: p });
37043
+ const p = (f) => {
37044
+ eQe({ url: f });
37045
37045
  };
37046
- return (p, f) => {
37047
- const g = Ie("a-empty"), h = Ie("a-button"), m = Ie("a-alert"), S = Ie("a-popover");
37046
+ return t({
37047
+ fileList: s
37048
+ }), (f, g) => {
37049
+ const h = Ie("a-empty"), m = Ie("a-button"), S = Ie("a-alert"), E = Ie("a-popover");
37048
37050
  return Y(), ee(gt, null, [
37049
- Q(S, { placement: "top" }, {
37051
+ Q(E, { placement: "top" }, {
37050
37052
  content: pe(() => [
37051
37053
  P("div", tQe, [
37052
- H(a).length ? (Y(!0), ee(gt, { key: 1 }, Fn(H(a), (E, A) => (Y(), ee("div", {
37054
+ H(s).length ? (Y(!0), ee(gt, { key: 1 }, Fn(H(s), (A, v) => (Y(), ee("div", {
37053
37055
  class: "file-item",
37054
- key: A
37056
+ key: v
37055
37057
  }, [
37056
- Q(h, {
37058
+ Q(m, {
37057
37059
  class: "file-name-btn",
37058
37060
  type: "link",
37059
37061
  size: "small",
37060
- onClick: (v) => d(E.downloadPath)
37062
+ onClick: (b) => p(A.downloadPath)
37061
37063
  }, {
37062
37064
  default: pe(() => [
37063
- P("span", nQe, Re(E.originalName), 1)
37065
+ P("span", nQe, Re(A.originalName), 1)
37064
37066
  ]),
37065
37067
  _: 2
37066
37068
  }, 1032, ["onClick"]),
37067
- Q(h, {
37069
+ Q(m, {
37068
37070
  style: { "margin-left": "15px" },
37069
37071
  type: "primary",
37070
37072
  danger: "",
37071
37073
  size: "small",
37072
- onClick: (v) => l(A)
37074
+ onClick: (b) => c(v)
37073
37075
  }, {
37074
- default: pe(() => f[0] || (f[0] = [
37076
+ default: pe(() => g[0] || (g[0] = [
37075
37077
  _e("删除")
37076
37078
  ])),
37077
37079
  _: 2
37078
37080
  }, 1032, ["onClick"])
37079
- ]))), 128)) : (Y(), Je(g, {
37081
+ ]))), 128)) : (Y(), Je(h, {
37080
37082
  key: 0,
37081
37083
  description: "暂无上传文件"
37082
37084
  })),
37083
- e.placeholder ? (Y(), Je(m, {
37085
+ e.placeholder ? (Y(), Je(S, {
37084
37086
  key: 2,
37085
37087
  style: { "margin-top": "10px" },
37086
37088
  message: e.placeholder,
@@ -37088,7 +37090,7 @@ const q9e = /* @__PURE__ */ uB(Y9e), V9e = { class: "group-box" }, H9e = {
37088
37090
  }, null, 8, ["message"])) : ke("", !0)
37089
37091
  ])
37090
37092
  ]),
37091
- title: pe(() => f[1] || (f[1] = [
37093
+ title: pe(() => g[1] || (g[1] = [
37092
37094
  P("span", null, "文件列表", -1)
37093
37095
  ])),
37094
37096
  default: pe(() => [
@@ -37102,12 +37104,12 @@ const q9e = /* @__PURE__ */ uB(Y9e), V9e = { class: "group-box" }, H9e = {
37102
37104
  fileType: e.fileType,
37103
37105
  multiple: e.multiple,
37104
37106
  url: e.url,
37105
- onChange: u
37107
+ onChange: d
37106
37108
  }, {
37107
37109
  default: pe(() => [
37108
- Q(h, {
37110
+ Q(m, {
37109
37111
  type: "primary",
37110
- disabled: H(a).length >= e.limit,
37112
+ disabled: H(s).length >= e.limit,
37111
37113
  style: Ht(`width:${parseInt(e.width + "")}px`)
37112
37114
  }, {
37113
37115
  default: pe(() => [
@@ -37124,33 +37126,33 @@ const q9e = /* @__PURE__ */ uB(Y9e), V9e = { class: "group-box" }, H9e = {
37124
37126
  }),
37125
37127
  P("div", rQe, [
37126
37128
  e.showFileList ? (Y(), ee("div", iQe, [
37127
- H(a).length ? (Y(!0), ee(gt, { key: 1 }, Fn(H(a), (E, A) => (Y(), ee("div", {
37129
+ H(s).length ? (Y(!0), ee(gt, { key: 1 }, Fn(H(s), (A, v) => (Y(), ee("div", {
37128
37130
  class: "uploaded-file-item",
37129
- key: A
37131
+ key: v
37130
37132
  }, [
37131
- Q(h, {
37133
+ Q(m, {
37132
37134
  class: "file-name-link",
37133
37135
  type: "link",
37134
37136
  size: "small",
37135
- onClick: (v) => d(E.downloadPath)
37137
+ onClick: (b) => p(A.downloadPath)
37136
37138
  }, {
37137
37139
  default: pe(() => [
37138
- P("span", oQe, Re(E.originalName), 1)
37140
+ P("span", oQe, Re(A.originalName), 1)
37139
37141
  ]),
37140
37142
  _: 2
37141
37143
  }, 1032, ["onClick"]),
37142
- Q(h, {
37144
+ Q(m, {
37143
37145
  type: "primary",
37144
37146
  danger: "",
37145
37147
  size: "small",
37146
- onClick: (v) => l(A)
37148
+ onClick: (b) => c(v)
37147
37149
  }, {
37148
- default: pe(() => f[2] || (f[2] = [
37150
+ default: pe(() => g[2] || (g[2] = [
37149
37151
  _e(" 删除 ")
37150
37152
  ])),
37151
37153
  _: 2
37152
37154
  }, 1032, ["onClick"])
37153
- ]))), 128)) : (Y(), Je(g, {
37155
+ ]))), 128)) : (Y(), Je(h, {
37154
37156
  key: 0,
37155
37157
  description: "暂无文件"
37156
37158
  }))
@@ -37159,7 +37161,7 @@ const q9e = /* @__PURE__ */ uB(Y9e), V9e = { class: "group-box" }, H9e = {
37159
37161
  ], 64);
37160
37162
  };
37161
37163
  }
37162
- }), sQe = /* @__PURE__ */ Pt(aQe, [["__scopeId", "data-v-fc7e151b"]]), lQe = { class: "upload-image" }, cQe = ["onClick"], uQe = { class: "upload-add-top" }, dQe = { class: "desc" }, pQe = /* @__PURE__ */ nt({
37164
+ }), sQe = /* @__PURE__ */ Pt(aQe, [["__scopeId", "data-v-53876fae"]]), lQe = { class: "upload-image" }, cQe = ["onClick"], uQe = { class: "upload-add-top" }, dQe = { class: "desc" }, pQe = /* @__PURE__ */ nt({
37163
37165
  __name: "UploadImage",
37164
37166
  props: {
37165
37167
  value: {