Открытие большой картинки
This commit is contained in:
1 parent
18e8943d25
commit
2ccf8903f8
1 file changed
+51
-30
@@ -60,12 +60,16 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
<my-helper :pretext="newsFull"/>
|
||||||
|
<!-- -->
|
||||||
<v-img
|
<v-img
|
||||||
:src="`${burl}${newsFull.link}`"
|
:src="`${burl}${newsFull.link}`"
|
||||||
height="450px"
|
height="450px"
|
||||||
width="96%"
|
width="96%"
|
||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
cover
|
cover
|
||||||
|
@click="openOneImg(newsFull.link)"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -398,6 +402,42 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<v-dialog
|
||||||
|
v-model="dialogfotoOne"
|
||||||
|
width="w-100"
|
||||||
|
height="900"
|
||||||
|
class="flex-column "
|
||||||
|
>
|
||||||
|
<v-card class="pa-4 h-100 flex-column d-flex">
|
||||||
|
<v-row class="flex-grow-0 justify-end">
|
||||||
|
<v-col class="pa-0 flex-grow-0">
|
||||||
|
<v-btn
|
||||||
|
density="compact"
|
||||||
|
variant="text"
|
||||||
|
icon="mdi-close"
|
||||||
|
@click="dialogfotoOne = false"
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row>
|
||||||
|
|
||||||
|
<v-col class="flex-column h_cards pa-0">
|
||||||
|
<v-img
|
||||||
|
class="d-flex"
|
||||||
|
:src="`${burl}${galleryimges}`"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -425,6 +465,7 @@ export default {
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const newsFull=ref([])
|
const newsFull=ref([])
|
||||||
const gallery = ref(false)
|
const gallery = ref(false)
|
||||||
|
|
||||||
const burl = baseURL.slice(0,-1)
|
const burl = baseURL.slice(0,-1)
|
||||||
|
|
||||||
const loadNews = () => {
|
const loadNews = () => {
|
||||||
@@ -494,6 +535,7 @@ export default {
|
|||||||
// ------------------------------ Галерея
|
// ------------------------------ Галерея
|
||||||
const galleryimges=ref([])
|
const galleryimges=ref([])
|
||||||
const dialogfoto = ref(false)
|
const dialogfoto = ref(false)
|
||||||
|
const dialogfotoOne = ref(false)
|
||||||
const indximg = ref('')
|
const indximg = ref('')
|
||||||
|
|
||||||
const openImg = (idimg) => {
|
const openImg = (idimg) => {
|
||||||
@@ -501,6 +543,13 @@ export default {
|
|||||||
indximg.value = newsFull.value.gallery.findIndex(e=>e.id == idimg)
|
indximg.value = newsFull.value.gallery.findIndex(e=>e.id == idimg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openOneImg = (idimg) => {
|
||||||
|
dialogfotoOne.value = true
|
||||||
|
galleryimges.value = idimg
|
||||||
|
console.log(idimg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
watch(()=>indximg ,(newValue,oldValue)=>{
|
watch(()=>indximg ,(newValue,oldValue)=>{
|
||||||
if(newValue){
|
if(newValue){
|
||||||
galleryimges.value = newsFull.value.gallery[newValue.value]
|
galleryimges.value = newsFull.value.gallery[newValue.value]
|
||||||
@@ -535,36 +584,7 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadimg = (idimg) => {
|
|
||||||
console.log(burl+idimg)
|
|
||||||
const link = document.createElement('a');
|
|
||||||
|
|
||||||
// link.href = burl+idimg
|
|
||||||
// link.setAttribute('download', 'file.jpg'); //or any other extension
|
|
||||||
// document.body.appendChild(link);
|
|
||||||
// link.click();
|
|
||||||
|
|
||||||
// let link = document.createElement("a")
|
|
||||||
|
|
||||||
// link.href = burl+idimg
|
|
||||||
// link.setAttribute("download", "image.jpeg");
|
|
||||||
// document.body.appendChild(link);
|
|
||||||
// link.download ='img.jpeg'
|
|
||||||
// link.download('img.jpeg')
|
|
||||||
// console.log(burl+idimg,'22222222222222222');
|
|
||||||
// link.remove()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// const excelOp = (ex) => {
|
|
||||||
// axiosApiInstance.get(`api/general_vacation/dailyroundup/?excel=${ex}`).then(result => {
|
|
||||||
// let link = document.createElement("a")
|
|
||||||
// link.href = baseURL+result.data.path
|
|
||||||
// link.click()
|
|
||||||
// link.remove()
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
return {
|
return {
|
||||||
route,
|
route,
|
||||||
newsFull,
|
newsFull,
|
||||||
@@ -588,7 +608,8 @@ export default {
|
|||||||
galleryimges,
|
galleryimges,
|
||||||
indximg,
|
indximg,
|
||||||
toggleIncrementLike,
|
toggleIncrementLike,
|
||||||
downloadimg
|
openOneImg,
|
||||||
|
dialogfotoOne
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user