|
@@ -40,6 +40,10 @@ export const actions = {
|
|
|
return error
|
|
|
}
|
|
|
},
|
|
|
+ updateLine({commit}, {index, value, field}) {
|
|
|
+ commit('setLineValue', {index, value, field})
|
|
|
+ // Surprise commit for next lectures (:
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
export const mutations = {
|
|
@@ -58,5 +62,10 @@ export const mutations = {
|
|
|
console.log('course.js mutations call removeLine params > ', field, ':', index)
|
|
|
state.item[field].splice(index, 1)
|
|
|
console.log('course.js mutations done removeLine params')
|
|
|
+ },
|
|
|
+ setLineValue(state, {index, value, field}) {
|
|
|
+ console.log('course.js mutations call setLineValue params > ', {index, value, field})
|
|
|
+ state.item[field][index].value = value
|
|
|
+ console.log('course.js mutations done setLineValue params')
|
|
|
}
|
|
|
}
|