Новостной контент с картинками

This commit is contained in:
iriska-gri committed 2023-11-29 11:25:43 +03:00
1 parent 7c07190261
commit 615b0917ea
4 files changed
+20 -6

No files matched your search

+12 -3
View File
@@ -41,7 +41,9 @@
<v-divider/>
<v-card-text class="pb-0">
{{limitText(x.text)}}
<div v-html=limitText(x.text)>
</div>
<!-- {{limitText(x.text)}} -->
</v-card-text>
<div class="pt-1 pl-1 pb-2">
@@ -69,7 +71,7 @@ import myHelper from './UI/my-helper.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import { format } from 'date-fns'
import { useRoute } from 'vue-router'
import {formatText} from '@/utils/universal_functions'
const accountStore = useAccountStore()
export default {
@@ -148,7 +150,13 @@ export default {
const limitText=(text)=> {
text = text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
const t = text.split(' ').slice(0, 25)
console.log(t, 'ttttttttttttttttttttttttttt');
// return t
// const t = text.split(' ').slice(0, 25)
return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}`
}
@@ -178,7 +186,8 @@ export default {
divs,
page,
selecnews,
route
route,
formatText
+4 -3
View File
@@ -231,8 +231,8 @@
</v-row>
</v-col>
<v-col class="flex-column d-flex">
<v-row class="flex-grow-0">
<v-col class="pb-0 ">
<!-- <v-row class="flex-grow-0">
<v-col class="bg-red pb-0 ">
<v-card
height="350px"
@@ -240,7 +240,7 @@
1
</v-card>
</v-col>
</v-row>
</v-row> -->
<v-row >
<v-col class="">
<v-card
@@ -761,6 +761,7 @@ export default {
}
const formatText= (text) => {
return text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
}
@@ -81,3 +81,7 @@ export function pagecounter(){
export function formatText(text) {
return text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB