12345678910111213141516 |
- import * as types from '../../types';
- export default {
- [types.UPDATE_DISTRIBUTORS]: (state, payload) => {
- Vue.set(state, 'distributors', payload);
- },
- [types.UPDATE_DISTRIBUTOR]: (state, payload) => {
- if (payload.id) {
- state.distributors.forEach(distributor => {
- if (distributor.id === payload.id) {
- distributor = Object.assign(distributor, payload);
- }
- });
- }
- }
- };
|