$arTemplateParameters['COLUMNS'] = array(
'PARENT' => 'VISUAL',
'NAME' => 'Количество колонок', // выносишь в lang
'TYPE' => 'LIST',
'VALUES' => array(
'2' => 2,
'3' => 3,
'4' => 4,
'5' => 5,
),
'DEFAULT' => '4',
);
<?if ($arParams["COLUMNS"] == "2"):?> class <? endif; ?>
vuex
state: {
ParamsAffiliate: JSON.parse(localStorage.getItem('ParamsAffiliate')),
},
mutations:{
setParams(state, payload) {
state.ParamsAffiliate = payload;
localStorage.setItem('ParamsAffiliate', JSON.stringify(payload));
}
},
actions: {
async getParams({commit, state}){
let response = await axios.get('/information/userbar/');
if (response.status === 200) {
commit('setParams', response.data);
}
},
component.vue
import { mapState } from 'vuex';
export default {
name: 'IdWeb',
computed: {
...mapState([
'ParamsAffiliate'
])
},
async mounted() {
await this.$store.dispatch('getParams');
},
}
Property or method "classes" is not defined on the instance but referenced during render.