ablok-components 0.1.66 → 0.1.68
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.
|
@@ -22455,7 +22455,16 @@ const SN = { class: "upload-group" }, TN = ["innerHTML"], BG = /* @__PURE__ */ J
|
|
|
22455
22455
|
type: String,
|
|
22456
22456
|
default: ""
|
|
22457
22457
|
},
|
|
22458
|
-
customFetch: null
|
|
22458
|
+
customFetch: null,
|
|
22459
|
+
mediaTypeMap: {
|
|
22460
|
+
type: Object,
|
|
22461
|
+
default: () => ({
|
|
22462
|
+
svg: "Svg",
|
|
22463
|
+
png: "Image",
|
|
22464
|
+
jpg: "Image"
|
|
22465
|
+
/* Image */
|
|
22466
|
+
})
|
|
22467
|
+
}
|
|
22459
22468
|
},
|
|
22460
22469
|
emits: ["update:modelValue"],
|
|
22461
22470
|
setup(t, { emit: A }) {
|
|
@@ -22465,8 +22474,8 @@ const SN = { class: "upload-group" }, TN = ["innerHTML"], BG = /* @__PURE__ */ J
|
|
|
22465
22474
|
},
|
|
22466
22475
|
set(r) {
|
|
22467
22476
|
A("update:modelValue", r.map((i, s) => (console.log("update", r), {
|
|
22468
|
-
mediaType: i.includes("data:image/svg") ? "Svg" : i.includes("data:image") ? "Image" : "Video",
|
|
22469
|
-
src: i,
|
|
22477
|
+
mediaType: i instanceof Object ? i.path && e.mediaTypeMap[i.path.split(".")[1]] : i.includes("data:image/svg") ? "Svg" : i.includes("data:image") ? "Image" : "Video",
|
|
22478
|
+
src: i instanceof Object ? `/media/${i.path}` : i,
|
|
22470
22479
|
name: `${e.name}-${s}`,
|
|
22471
22480
|
...e.type ? { type: e.type } : {}
|
|
22472
22481
|
})));
|