bx-1379-redesign #15
|
@ -7,10 +7,13 @@ import { getRandomIntInclusive } from "../../helpers";
|
|||
|
||||
const props = defineProps(['files'])
|
||||
const cover = getRandomIntInclusive(0, props.files.length)
|
||||
const coverImg = props.files.length > 1 ? `url(${props.files[cover]})` : 'url(/src/assets/promo/map.png)'
|
||||
const coverImg = props.files.length > 1 ? `url(${IMAGE_URL}/${props.files[cover].file})` : 'url(/src/assets/promo/map.png)'
|
||||
|
||||
onMounted(async () => {
|
||||
const files = props.files.length > 1 ? props.files.splice(cover, 1) : props.files
|
||||
const files = props.files.slice(0)
|
||||
if (files.length > 1) {
|
||||
files.splice(cover, 1)
|
||||
}
|
||||
|
||||
// const width = 1920
|
||||
// const height = 1080
|
||||
|
|
Loading…
Reference in New Issue