智能柜api日志创建时间和设备详情日志时间线和货柜商品编辑图片显示

This commit is contained in:
weiwei committed 2025-04-16 14:57:12 +08:00
1 parent dcd70aadd5
commit c963fe11c7
5 files changed
+123 -16

No files matched your search

+33 -11
View File
@@ -167,17 +167,39 @@ watch(
return
}
fileList.value = newValue
.split(",")
.map((item: string) => {
const url = item.startsWith("http") ? item : imageBaseUrl + item
return {
name: item.split("/").pop() || "",
url: url,
fileUrl: item,
}
})
.filter((item) => item.url)
if (!newValue.match(/x-oss-process/g)) {
fileList.value = newValue
.split(",")
.map((item: string) => {
const url = item.startsWith("http") ? item : imageBaseUrl + item
return {
name: item.split("/").pop() || "",
url: url,
fileUrl: item,
}
})
.filter((item) => item.url)
console.log("fileList.value", fileList.value)
} else {
fileList.value = newValue
.split("?")
.filter(
(item) =>
item.endsWith(".jpg") || item.endsWith(".png") || item.endsWith(".gif") || item.endsWith(".jpeg") || item.endsWith(".webp"),
)
.map((item: string) => {
const url = item.startsWith("http") ? item : imageBaseUrl + item
return {
name: item.split("/").pop() || "",
url: url,
fileUrl: item,
}
})
.filter((item) => item.url)
console.log("fileList.value", fileList.value)
}
},
{ immediate: true },
)