移动端品牌活动图片预览整改
This commit is contained in:
@@ -347,6 +347,19 @@ module.exports = {
|
||||
|
||||
// 预览图片
|
||||
handlePreview(file) {
|
||||
if (this.upload_mode === "image") {
|
||||
// 回显记录的名称可能是无扩展名的下载地址;图片模式直接预览缩略图地址。
|
||||
const url = file.url || (this.upload_result_type === "url" && file.response?.data)
|
||||
if (!url) {
|
||||
this.$message.warning("暂无可预览的图片")
|
||||
return
|
||||
}
|
||||
const image = new Image()
|
||||
image.src = url
|
||||
const viewer = new Viewer(image, {zIndex: 99999, title: false, hidden: () => viewer.destroy()})
|
||||
viewer.show()
|
||||
return
|
||||
}
|
||||
const suffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase()
|
||||
const fileId = file.response.data.substring(file.response.data.lastIndexOf("=") + 1)
|
||||
const buildFile = {
|
||||
|
||||
Reference in New Issue
Block a user