Галерея v1

This commit is contained in:
iriska-gri committed 2023-12-04 15:16:09 +03:00
1 parent a3ded8373d
commit 9550a5ff10
2 files changed
+81 -22

No files matched your search

+81 -21
View File
@@ -293,14 +293,47 @@
<v-row>
<v-col
class="d-flex pa-1 flex-column"
v-for="n in x.gallery"
:key="n"
class="d-flex child-flex"
>
<!-- <vue-masonry-gallery :imgsArr="`${burl}${n.img}`"></vue-masonry-gallery> -->
<v-card
class="ma-auto d-flex flex-column w-100 elevation-0 flex-wrap"
min-width="200"
height="250"
>
<v-img
class="w-100 h-100"
:src="`${burl}${n.img}`"
@click="openImg(n.img)"
>
</v-img>
<v-card-text class="pt-6">
<!-- <div class="font-weight-light text-grey text-h6 mb-2">
For the perfect meal
</div> -->
</v-card-text>
</v-card>
<!-- <v-img
:src="`${burl}${n.img}`"
@@ -308,6 +341,7 @@
aspect-ratio="0"
cover
class="bg-grey-lighten-2"
@click="openImg(n.img)"
>
<template v-slot:placeholder>
<v-row
@@ -325,8 +359,7 @@
</v-img> -->
</v-col>
</v-row>
<!-- <div v-html=formatText(x.text)>
</div> -->
@@ -454,6 +487,34 @@
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog
v-model="dialogfoto"
width="w-100"
height="900"
class="flex-column "
>
<v-card class="pa-4">
<v-img
class="d-flex "
:src="`${burl}${imgsrc}`"
>
</v-img>
<!-- <v-btn color="primary" block @click="dialogfoto = false">Close Dialog</v-btn> -->
</v-card>
</v-dialog>
</v-row>
@@ -472,6 +533,7 @@ import { useRoute } from 'vue-router'
import { spravURL } from '@/utils/axios-api'
const accountStore = useAccountStore()
export default {
@@ -487,19 +549,17 @@ export default {
const newss=ref([])
const items =ref ([ { content: 'First', height: 150 },
{ content: 'http://127.0.0.1:8000/media/newsgallery/2023/12/01/world-of-warcraft-wow-znak.jpg', height: 300 },
{ content: 'Third', height: 150 },
{ content: 'Fourth', height: 450 }])
const imgsArr=ref([{src: 'world-of-warcraft-wow-znak.jpg', href: 'http://127.0.0.1:8000/media/newsgallery/2023/12/01/world-of-warcraft-wow-znak.jpg'}])
const dialogCommentShow = ref(false)
const gallery = ref(false)
const dialogfoto = ref(false)
const burl = baseURL.slice(0,-1)
const textcomment = ref('')
const idnews = ref(0)
const page = ref(1)
const selecnews = ref(2)
const route = useRoute()
const imgsrc = ref('')
let str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`
@@ -538,6 +598,14 @@ export default {
}
const openImg = (img) => {
imgsrc.value = ''
dialogfoto.value = true
imgsrc.value = img
}
const addComment = () => {
axiosApiInstance.post(`api/navigation/news/`, {news: idnews.value, text: textcomment.value}).then(result => {
console.log('----------------111111111111111111111111111111111');
@@ -583,15 +651,6 @@ export default {
}
}, {deep:true})
// watch(()=>newss ,(newValue,oldValue)=>{
// if(newValue){
// console.log('111111111');
// }
// else {
// console.log('2222222222222');
// }
// }
// )
const dateformat = (datas) => {
return format(new Date(datas), 'dd.MM.yyyy HH:mm')
@@ -620,7 +679,7 @@ export default {
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
}
@@ -648,8 +707,9 @@ export default {
spravURL,
formatText,
gallery,
imgsArr,
items
openImg,
dialogfoto,
imgsrc
-1
View File
@@ -1 +0,0 @@
declare module 'vue-masonry-gallery'