create new img instead of clone
This commit is contained in:
parent
facd974814
commit
edd7268b7b
16
main.js
16
main.js
@ -132,6 +132,10 @@
|
||||
static a(params) {
|
||||
return this.make("a", params)
|
||||
}
|
||||
|
||||
static img(params) {
|
||||
return this.make("img", params)
|
||||
}
|
||||
}
|
||||
|
||||
class Property {
|
||||
@ -384,7 +388,7 @@
|
||||
}
|
||||
},
|
||||
children: [
|
||||
Tag.make("img", {
|
||||
Tag.img({
|
||||
src: "https://upload.wikimedia.org/wikipedia/commons/a/aa/Bw_copy_icon_320x320.svg"
|
||||
})
|
||||
]
|
||||
@ -419,7 +423,7 @@
|
||||
}
|
||||
},
|
||||
children: [
|
||||
Tag.make("img", {
|
||||
Tag.img({
|
||||
src: iconSrc,
|
||||
classes: "map-icon"
|
||||
})
|
||||
@ -909,10 +913,6 @@
|
||||
})
|
||||
|
||||
for (const file of files) {
|
||||
let swiperFile = file.cloneNode(true)
|
||||
if (swiperFile.dataset.origin)
|
||||
swiperFile.src = swiperFile.dataset.origin
|
||||
|
||||
let swiperSlide = Tag.div({
|
||||
classes: "swiper-slide",
|
||||
children: [
|
||||
@ -922,7 +922,9 @@
|
||||
text: "Скачать",
|
||||
target: "_blank"
|
||||
}),
|
||||
swiperFile
|
||||
Tag.img({
|
||||
src: file.dataset.origin
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user