Новости с текстом
This commit is contained in:
1 parent
31b1a9e1c5
commit
f9b5b7853b
1 file changed
+28
-7
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="d-flex flex-column flex-fill">
|
||||
|
||||
<v-row class="d-flex flex-column ">
|
||||
<v-row class="d-flex flex-column ma-0">
|
||||
<v-col class=" flex-column d-flex ">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pb-0 pr-0 ">
|
||||
@@ -16,6 +16,7 @@
|
||||
{{newsFull.title}}
|
||||
</v-col>
|
||||
<v-col class="pa-0 pr-3 pt-1 flex-grow-1 d-flex flex-column flex-wrap">
|
||||
<!-- <my-helper :pretext="newsFull.text.length"/> -->
|
||||
<v-switch
|
||||
v-model="gallery"
|
||||
class="align-self-end comgal"
|
||||
@@ -46,6 +47,7 @@
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-switch>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-title>
|
||||
@@ -59,12 +61,12 @@
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <v-row>
|
||||
<v-row>
|
||||
<v-col class="pt-0 pr-0">
|
||||
<v-card
|
||||
class="rounded-t-0 flex-column d-flex h-100 Line truncated
|
||||
>
|
||||
<v-list-item class="w-100">
|
||||
<!-- <v-list-item class="w-100">
|
||||
<template v-slot:prepend>
|
||||
<v-avatar
|
||||
color="loading_avatar"
|
||||
@@ -86,12 +88,11 @@
|
||||
<span class="subheading">{{ newsFull.comment.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list-item> -->
|
||||
<v-divider/>
|
||||
<v-row class="ma-0 my-3 overflow-auto h-0">
|
||||
<v-col class="pa-0">
|
||||
<v-card-text class="pt-0">
|
||||
|
||||
<div v-if="newsFull.text" v-html=formatText(newsFull.text)>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -110,7 +111,7 @@
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<!--</v-col>
|
||||
<v-col class="flex-column d-flex "
|
||||
>
|
||||
|
||||
@@ -316,6 +317,11 @@ import { useRoute } from 'vue-router'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { ref } from 'vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
export default {
|
||||
|
||||
@@ -355,13 +361,28 @@ export default {
|
||||
|
||||
loadNews()
|
||||
|
||||
const splitname = (name) => {
|
||||
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
|
||||
}
|
||||
|
||||
const formatText= (text) => {
|
||||
|
||||
return text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
|
||||
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
|
||||
route,
|
||||
newsFull,
|
||||
gallery,
|
||||
burl
|
||||
burl,
|
||||
checkremote,
|
||||
spravURL,
|
||||
splitname,
|
||||
accountStore,
|
||||
formatText
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user