From 7b9aae86876450e9f3445d3067ab4be2bf9fa44c Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 27 Dec 2023 12:40:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B4=D0=B0=D1=82=D0=B0=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/UI/news-card.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/front/src/components/UI/news-card.vue b/src/front/src/components/UI/news-card.vue index 6d1ff59a3..0f4fa4a6e 100644 --- a/src/front/src/components/UI/news-card.vue +++ b/src/front/src/components/UI/news-card.vue @@ -101,7 +101,7 @@ - + Подробнее - {{news.cdate}} + {{formatDate(news.cdate)}} @@ -123,7 +123,7 @@ import { baseURL } from '@/utils/axios-api' import {useAccountStore} from '@/store/AccountStore' import { axiosApiInstance } from '@/utils/axios-api' import {splitname} from '@/utils/universal_functions' - +import moment from 'moment' const accountStore = useAccountStore() @@ -165,13 +165,18 @@ export default { emit('openOneImg') } + function formatDate(date) { + return moment(date).format('DD-MM-YYYY') + } + return { accountStore, burl, limitText, splitname, toggleIncrementLike, - openOneImg + openOneImg, + formatDate } }