G
Size: a a a
G
YK
R
{
floors: {
floor: 4,
total: 7
},
...}
R
Cannot read property 'total' of undefined
R
СМ
R
export const state = () => ({
objectsCompany: [],
objectCompany: {},
status: null,
})
export const actions = {
// ==== Получение всех обьектов
async get_objects({ commit }) {
await this.$axios
.$get(api)
.then((res) => {
return commit('mGET_OBJECTS', res.reverse())
})
.catch((err) => {
return commit('ERROR', err)
})
},
...
R
export const mutations = {
mGET_OBJECTS(state, data) {
state.objectsCompany = data
state.status = 'Обьекты успешно загружены'
},
...
R
export const getters = {
objects: (s) => s.objectsCompany,
}
СМ
СМ
R
R
R
СМ
R
object.size.total
СМ
СМ