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