Skip to content

Commit 131204f

Browse files
committed
Fixed foo store show module
1 parent 6f73ef7 commit 131204f

File tree

1 file changed

+10
-2
lines changed
  • templates/vue/store/modules/foo

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,18 @@ function retrieved(commit, retrieved) {
2323
return commit({{{ uc }}}_SHOW_RETRIEVED_SUCCESS, retrieved);
2424
}
2525

26-
const getters = {};
26+
function reset() {
27+
return commit({{{ uc }}}_SHOW_RESET);
28+
}
29+
30+
const getters = {
31+
error: state => state.error,
32+
loading: state => state.loading,
33+
item: state => state.retrieved
34+
};
2735

2836
const actions = {
29-
retrieve({ commit }) {
37+
retrieve({ commit }, id) {
3038
loading(commit, true);
3139

3240
return {{{ lc }}}Fetch(id)

0 commit comments

Comments
 (0)