Массивы:
<template lang="pug">
-
var activityListRu = [
{
i: 'account-switch',
t: '1'
},
{
i: 'account-search',
t: '2'
},
{
i: 'account-star',
t: '3'
}
]
-
var activityListEn = [
{
i: 'account-switch',
t: '4'
},
{
i: 'account-search',
t: '5'
},
{
i: 'account-star',
t: '6'
}
];
...
v-row.d-none.d-sm-flex.mb-4
each card in this.$root.$i18n.locale === "ru" ? activityListRu : activityListEn
v-col(cols='12', sm='4')
...
v-row.d-none.d-sm-flex.mb-4
each card in activityListLocale()
v-col(cols='12', sm='4')
...
methods: {
activityListLocale() {
if (this.$root.$i18n.locale === 'ru') {
return activityListRu
} else if (this.$root.$i18n.locale === 'en') {
return activityListEn
}
},
},