Skip to content

Commit ec0c66d

Browse files
committed
Fix store module
1 parent 78bf55c commit ec0c66d

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

templates/vue/store/modules/foo/create.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {{{ lc }}}Fetch from '../../api/{{{ lc }}}Fetch';
1+
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
22

33
const {{{ uc }}}_CREATE_ERROR = '{{{ uc }}}_CREATE_ERROR';
44
const {{{ uc }}}_CREATE_LOADING = '{{{ uc }}}_CREATE_LOADING';
@@ -45,13 +45,13 @@ const actions = {
4545
};
4646

4747
const mutations = {
48-
[{{{ uc }}}_CREATE_ERROR] (state, { error }) {
48+
[{{{ uc }}}_CREATE_ERROR] (state, error) {
4949
state.error = error;
5050
},
51-
[{{{ uc }}}_CREATE_LOADING] (state, { loading }) {
51+
[{{{ uc }}}_CREATE_LOADING] (state, loading) {
5252
state.loading = loading;
5353
},
54-
[{{{ uc }}}_CREATE_SUCCESS] (state, { created }) {
54+
[{{{ uc }}}_CREATE_SUCCESS] (state, created) {
5555
state.created = created;
5656
}
5757
};

templates/vue/store/modules/foo/delete.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {{{ lc }}}Fetch from '../../api/{{{ lc }}}Fetch';
1+
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
22

33
const {{{ uc }}}_DELETE_ERROR = '{{{ uc }}}_DELETE_ERROR';
44
const {{{ uc }}}_DELETE_LOADING = '{{{ uc }}}_DELETE_LOADING';
@@ -41,13 +41,13 @@ const actions = {
4141
};
4242

4343
const mutations = {
44-
[{{{ uc }}}_DELETE_ERROR] (state, { error }) {
44+
[{{{ uc }}}_DELETE_ERROR] (state, error) {
4545
state.error = error;
4646
},
47-
[{{{ uc }}}_DELETE_LOADING] (state, { loading }) {
47+
[{{{ uc }}}_DELETE_LOADING] (state, loading) {
4848
state.loading = loading;
4949
},
50-
[{{{ uc }}}_DELETE_SUCCESS] (state, { deleted }) {
50+
[{{{ uc }}}_DELETE_SUCCESS] (state, deleted) {
5151
state.deleted = deleted;
5252
}
5353
};

templates/vue/store/modules/foo/list.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {{{ lc }}}Fetch from '../../api/{{{ lc }}}Fetch';
1+
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
22

33
const {{{ uc }}}_LIST_ERROR = '{{{ uc }}}_LIST_ERROR';
44
const {{{ uc }}}_LIST_LOADING = '{{{ uc }}}_LIST_LOADING';
@@ -59,19 +59,19 @@ const actions = {
5959
};
6060

6161
const mutations = {
62-
[{{{ uc }}}_LIST_ERROR] (state, { error }) {
62+
[{{{ uc }}}_LIST_ERROR] (state, error) {
6363
state.error = error;
6464
},
65-
[{{{ uc }}}_LIST_LOADING] (state, { loading }) {
65+
[{{{ uc }}}_LIST_LOADING] (state, loading) {
6666
state.loading = loading;
6767
},
6868
[{{{ uc }}}_LIST_RESET] (state) {
6969
state.items = [];
7070
},
71-
[{{{ uc }}}_LIST_VIEW] (state, { items }) {
71+
[{{{ uc }}}_LIST_VIEW] (state, items) {
7272
state.view = items;
7373
},
74-
[{{{ uc }}}_LIST_SUCCESS] (state, { items }) {
74+
[{{{ uc }}}_LIST_SUCCESS] (state, items) {
7575
state.items = items;
7676
}
7777
};

templates/vue/store/modules/foo/show.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import {{{ lc }}}Fetch from '../../api/{{{ lc }}}Fetch';
1+
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
22

33
const {{{ uc }}}_SHOW_ERROR = '{{{ uc }}}_SHOW_ERROR';
44
const {{{ uc }}}_SHOW_LOADING = '{{{ uc }}}_SHOW_LOADING';
55
const {{{ uc }}}_SHOW_RETRIEVED_SUCCESS = '{{{ uc }}}_SHOW_RETRIEVED_SUCCESS';
6+
const {{{ uc }}}_SHOW_RESET = '{{{ uc }}}_SHOW_RESET';
67

78
const state = {
89
loading: false,
@@ -42,15 +43,15 @@ const actions = {
4243
};
4344

4445
const mutations = {
45-
[{{{ uc }}}_SHOW_ERROR] (state, { error }) {
46+
[{{{ uc }}}_SHOW_ERROR] (state, error) {
4647
state.error = error;
4748
},
48-
[{{{ uc }}}_SHOW_LOADING] (state, { loading }) {
49+
[{{{ uc }}}_SHOW_LOADING] (state, loading) {
4950
state.loading = loading;
5051
},
51-
[{{{ uc }}}_SHOW_RETRIEVED_SUCCESS] (state, { retrieved }) {
52+
[{{{ uc }}}_SHOW_RETRIEVED_SUCCESS] (state, retrieved) {
5253
state.retrieved = retrieved;
53-
}
54+
},
5455
[{{{ uc }}}_SHOW_RESET] (state) {
5556
state.retrieved = null;
5657
}

templates/vue/store/modules/foo/update.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {{{ lc }}}Fetch from '../../api/{{{ lc }}}Fetch';
1+
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
22

33
const {{{ uc }}}_UPDATE_RESET = '{{{ uc }}}_UPDATE_RESET';
44
const {{{ uc }}}_UPDATE_UPDATE_ERROR = '{{{ uc }}}_UPDATE_UPDATE_ERROR';
@@ -87,25 +87,25 @@ const actions = {
8787
};
8888

8989
const mutations = {
90-
[{{{ uc }}}_UPDATE_RETRIEVE_ERROR] (state, { retrieveError }) {
90+
[{{{ uc }}}_UPDATE_RETRIEVE_ERROR] (state, retrieveError) {
9191
state.retrieveError = retrieveError;
9292
},
93-
[{{{ uc }}}_UPDATE_RETRIEVE_LOADING] (state, { retrieveLoading }) {
93+
[{{{ uc }}}_UPDATE_RETRIEVE_LOADING] (state, retrieveLoading) {
9494
state.retrieveLoading = retrieveLoading;
9595
},
96-
[{{{ uc }}}_UPDATE_RETRIEVE_SUCCESS] (state, { retrieved }) {
96+
[{{{ uc }}}_UPDATE_RETRIEVE_SUCCESS] (state, retrieved) {
9797
state.retrieved = retrieved;
9898
},
99-
[{{{ uc }}}_UPDATE_UPDATE_LOADING] (state, { loading }) {
99+
[{{{ uc }}}_UPDATE_UPDATE_LOADING] (state, loading) {
100100
state.updateLoading = loading;
101101
},
102-
[{{{ uc }}}_UPDATE_UPDATE_ERROR] (state, { updateError }) {
102+
[{{{ uc }}}_UPDATE_UPDATE_ERROR] (state, updateError) {
103103
state.updateError = updateError;
104104
},
105-
[{{{ uc }}}_UPDATE_UPDATE_LOADING] (state, { updateLoading }) {
105+
[{{{ uc }}}_UPDATE_UPDATE_LOADING] (state, updateLoading) {
106106
state.updateLoading = updateLoading;
107107
},
108-
[{{{ uc }}}_UPDATE_UPDATE_SUCCESS] (state, { updated }) {
108+
[{{{ uc }}}_UPDATE_UPDATE_SUCCESS] (state, updated) {
109109
state.updated = updated;
110110
},
111111
[{{{ uc }}}_UPDATE_RESET] (state) {

0 commit comments

Comments
 (0)