From 9550a5ff1089d1bbf61b6a343f0f2018acb63074 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:16:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=B0=D0=BB=D0=B5=D1=80=D0=B5=D1=8F=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/news-list-news.vue | 102 ++++++++++++++---- .../src/types/vue-masonry-gallery/index.d.ts | 1 - 2 files changed, 81 insertions(+), 22 deletions(-) delete mode 100644 src/front/src/types/vue-masonry-gallery/index.d.ts diff --git a/src/front/src/components/news-list-news.vue b/src/front/src/components/news-list-news.vue index c2d9cb9b8..3e6eadc51 100644 --- a/src/front/src/components/news-list-news.vue +++ b/src/front/src/components/news-list-news.vue @@ -293,14 +293,47 @@ + - + + + + + + + + + + + + + + + + + - + @@ -454,6 +487,34 @@ + + + + + + + + + + + + + + + + + + @@ -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 diff --git a/src/front/src/types/vue-masonry-gallery/index.d.ts b/src/front/src/types/vue-masonry-gallery/index.d.ts deleted file mode 100644 index 510f694fa..000000000 --- a/src/front/src/types/vue-masonry-gallery/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'vue-masonry-gallery' \ No newline at end of file