Увеличить главную картинку начало

This commit is contained in:
iriska-gri committed 2023-12-14 16:37:22 +03:00
1 parent 8f86143710
commit 18e8943d25
2 files changed
+33 -31

No files matched your search

+33 -31
View File
@@ -335,17 +335,7 @@
class="flex-column " class="flex-column "
> >
<v-card class="pa-4 h-100 flex-column d-flex"> <v-card class="pa-4 h-100 flex-column d-flex">
<v-row class="flex-grow-0 justify-space-between"> <v-row class="flex-grow-0 justify-end">
<v-col class="py-0 flex-grow-0">
<v-btn
density="compact"
variant="text"
icon="mdi-cloud-download"
@click="downloadimg(galleryimges.img)"
/>
<my-helper :pretext="galleryimges.img"/>
</v-col>
<v-col class="pa-0 flex-grow-0"> <v-col class="pa-0 flex-grow-0">
<v-btn <v-btn
density="compact" density="compact"
@@ -360,11 +350,12 @@
<v-row> <v-row>
<v-col class="flex-grow-0 align-self-center"> <v-col class="flex-grow-0 align-self-center">
<v-btn <v-btn
density="compact" :disabled="newsFull.gallery.length==1"
variant="text" density="compact"
icon="mdi-chevron-left" variant="text"
@click = "indximg !=0? indximg -=1:indximg=newsFull.gallery.length-1" icon="mdi-chevron-left"
/> @click = "indximg !=0? indximg -=1:indximg=newsFull.gallery.length-1"
/>
</v-col> </v-col>
<v-col class="flex-column h_cards pa-0"> <v-col class="flex-column h_cards pa-0">
<v-img <v-img
@@ -378,10 +369,11 @@
<v-row> <v-row>
<v-col class="flex-column d-flex align-end align-self-center"> <v-col class="flex-column d-flex align-end align-self-center">
<v-btn <v-btn
density="compact" :disabled="newsFull.gallery.length==1"
variant="text" density="compact"
icon="mdi-chevron-right" variant="text"
@click = "indximg !=newsFull.gallery.length-1? indximg +=1:indximg=0" icon="mdi-chevron-right"
@click = "indximg !=newsFull.gallery.length-1? indximg +=1:indximg=0"
/> />
</v-col> </v-col>
</v-row> </v-row>
@@ -390,11 +382,12 @@
<v-row class="flex-grow-1 align-self-center d-flex placeIt"> <v-row class="flex-grow-1 align-self-center d-flex placeIt">
<v-col class="pa-0"> <v-col class="pa-0">
<v-btn <v-btn
density="compact"
variant="text" density="compact"
:color="heartIco()?'red':'black'" variant="text"
:icon= "heartIco()?'mdi-heart':'mdi-heart-outline'" :color="heartIco()?'red':'black'"
@click = toggleLike(galleryimges.id) :icon= "heartIco()?'mdi-heart':'mdi-heart-outline'"
@click = toggleLike(galleryimges.id)
/> />
</v-col> </v-col>
<v-col class="pa-0 text-overline"> <v-col class="pa-0 text-overline">
@@ -543,14 +536,23 @@ export default {
} }
const downloadimg = (idimg) => { const downloadimg = (idimg) => {
console.log(burl+idimg)
const link = document.createElement('a');
let link = document.createElement("a") // link.href = burl+idimg
// link.setAttribute('download', 'file.jpg'); //or any other extension
// document.body.appendChild(link);
// link.click();
link.href = burl+idimg // let link = document.createElement("a")
link.download ='img.jpeg'
link.click() // link.href = burl+idimg
console.log(burl, idimg,'22222222222222222'); // link.setAttribute("download", "image.jpeg");
link.remove() // document.body.appendChild(link);
// link.download ='img.jpeg'
// link.download('img.jpeg')
// console.log(burl+idimg,'22222222222222222');
// link.remove()
} }
Binary file not shown.