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