На заливку
This commit is contained in:
1 parent
a6feb8449f
commit
94bbdeca40
7 files changed
+81
-19
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
||||
<my-helper
|
||||
:pretext ="accountStore.user.id"
|
||||
:pretext ="newss"
|
||||
/>
|
||||
<v-card
|
||||
class="mx-auto mb-0 "
|
||||
@@ -50,11 +50,11 @@
|
||||
<v-row >
|
||||
<v-col>
|
||||
<v-btn
|
||||
variant="text"
|
||||
:icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score ==true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
||||
color="blue-darken-3"
|
||||
@click="toggleIncrementLike(x.id, true)"
|
||||
/>
|
||||
variant="text"
|
||||
:icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score ==true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
||||
color="blue-darken-3"
|
||||
@click="toggleIncrementLike(x.id, true)"
|
||||
/>
|
||||
{{x.scores.filter(e=> e.score==true).length}}
|
||||
<!-- {{ x.likes }} -->
|
||||
</v-col>
|
||||
@@ -63,10 +63,11 @@
|
||||
variant="text"
|
||||
icon="mdi-message-text-outline"
|
||||
color="teal"
|
||||
@click="commentShow=!commentShow"
|
||||
@click="x.showComment=!x.showComment"
|
||||
/>
|
||||
{{ x.comment.length }}
|
||||
<!-- @click="commentadd" -->
|
||||
{{ message }}
|
||||
|
||||
<!-- <v-btn
|
||||
:icon="x.show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
|
||||
@click="x.show = !x.show"
|
||||
@@ -94,8 +95,24 @@
|
||||
|
||||
</v-expand-transition>
|
||||
<v-expand-transition>
|
||||
<div v-show="commentShow">
|
||||
<!-- {{ x.commnet.text }} -->
|
||||
<div v-show="x.showComment" v-if="x.comment.length>0">
|
||||
<div
|
||||
v-for = "(y, key) in x.comment"
|
||||
:key="key"
|
||||
|
||||
|
||||
class="d-flex align-center flex-column py-3"
|
||||
>
|
||||
<div class="text-subtitle-2">{{dateformat(y.cdate)}}</div>
|
||||
|
||||
<v-card
|
||||
width="400"
|
||||
:subtitle=y.author
|
||||
:text=y.text
|
||||
elevation="1"
|
||||
></v-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</v-card>
|
||||
@@ -149,6 +166,7 @@ import {getfromserver} from '@/utils/universal_functions'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import myHelper from './UI/my-helper.vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { format } from 'date-fns'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -196,6 +214,11 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
const dateformat = (datas) => {
|
||||
|
||||
return format(new Date(datas), 'dd.MM.yyyy')
|
||||
}
|
||||
|
||||
const toggleDecrementLike = (idnews) => {
|
||||
// if (likedD.value) {
|
||||
// derementLikes.value--
|
||||
@@ -256,7 +279,8 @@ export default {
|
||||
toggleDecrementLike,
|
||||
dialogCommentShow,
|
||||
commentadd,
|
||||
accountStore
|
||||
accountStore,
|
||||
dateformat
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user