Новостной контент с картинками
This commit is contained in:
1 parent
7c07190261
commit
615b0917ea
4 files changed
+20
-6
No files matched your search
@@ -41,7 +41,9 @@
|
|||||||
<v-divider/>
|
<v-divider/>
|
||||||
|
|
||||||
<v-card-text class="pb-0">
|
<v-card-text class="pb-0">
|
||||||
{{limitText(x.text)}}
|
<div v-html=limitText(x.text)>
|
||||||
|
</div>
|
||||||
|
<!-- {{limitText(x.text)}} -->
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
<div class="pt-1 pl-1 pb-2">
|
<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 { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import { format } from 'date-fns'
|
import { format } from 'date-fns'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
import {formatText} from '@/utils/universal_functions'
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -148,7 +150,13 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
const limitText=(text)=> {
|
const limitText=(text)=> {
|
||||||
|
|
||||||
|
text = text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
|
||||||
const t = text.split(' ').slice(0, 25)
|
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?'':'...'}`
|
return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +186,8 @@ export default {
|
|||||||
divs,
|
divs,
|
||||||
page,
|
page,
|
||||||
selecnews,
|
selecnews,
|
||||||
route
|
route,
|
||||||
|
formatText
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -231,8 +231,8 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row class="flex-grow-0">
|
<!-- <v-row class="flex-grow-0">
|
||||||
<v-col class="pb-0 ">
|
<v-col class="bg-red pb-0 ">
|
||||||
<v-card
|
<v-card
|
||||||
height="350px"
|
height="350px"
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
1
|
1
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row> -->
|
||||||
<v-row >
|
<v-row >
|
||||||
<v-col class="">
|
<v-col class="">
|
||||||
<v-card
|
<v-card
|
||||||
@@ -761,6 +761,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const formatText= (text) => {
|
const formatText= (text) => {
|
||||||
|
|
||||||
return text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
|
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 |
Reference in new issue
Block a user