add date formating
This commit is contained in:
+6
-1
@@ -7,7 +7,8 @@ import {
|
||||
VARIANT_IDS,
|
||||
RELATIONS,
|
||||
reduceQueryIds,
|
||||
reduceQueryLevels
|
||||
reduceQueryLevels,
|
||||
formatDate
|
||||
} from '@/store/utils'
|
||||
import {
|
||||
AllNodesOfVariant
|
||||
@@ -40,6 +41,10 @@ export default {
|
||||
node.variant = [{ id: 0 }]
|
||||
}
|
||||
|
||||
if (node.date) {
|
||||
node.date.start = formatDate(node.date.start)
|
||||
}
|
||||
|
||||
if (node.images && node.images.length) {
|
||||
const { url, alt, id } = node.images[0]
|
||||
node.image = { alt, id, url: url.replace('api', 'api/sites/default/files') }
|
||||
|
||||
Reference in New Issue
Block a user