Skip to content

Commit 0bfc463

Browse files
author
HyeongjunCho
committed
Set many things in Home and set store
1 parent 0ced5d3 commit 0bfc463

12 files changed

+130
-33
lines changed

app/app.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import Vue from "nativescript-vue";
2+
import store from "./store";
23

34
import Home from "./pages/Home";
45

56
Vue.registerElement("FixedAbsoluteLayout", () => require("../fixAbsoluteLayout").AbsoluteLayout);
7+
Vue.use(store);
68
new Vue({
7-
89
template: `
910
<Frame>
1011
<Home />
1112
</Frame>`,
12-
13+
store,
1314
components: {
1415
Home
1516
}

app/pages/Home.vue

+62-30
Large diffs are not rendered by default.

app/store/event/actions.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const actions = {
2+
3+
};
4+
5+
export default actions;

app/store/event/getters.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const getters = {
2+
3+
};
4+
5+
export default getters;

app/store/event/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import actions from "./actions";
2+
import getters from "./getters";
3+
import mutations from "./mutations";
4+
5+
export default {
6+
state: {},
7+
actions,
8+
mutations,
9+
getters
10+
};

app/store/event/mutations.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const mutations = {
2+
3+
};
4+
5+
export default mutations;

app/store/index.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Vue from "nativescript-vue";
2+
import Vuex from "vuex";
3+
import Event from "./event";
4+
import Population from "./population";
5+
6+
Vue.use(Vuex);
7+
8+
export default new Vuex.Store({
9+
modules: {
10+
event: Event,
11+
population: Population,
12+
}
13+
});

app/store/population/actions.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const actions = {
2+
3+
};
4+
5+
export default actions;

app/store/population/getters.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const getters = {
2+
3+
};
4+
5+
export default getters;

app/store/population/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import actions from "./actions";
2+
import getters from "./getters";
3+
import mutations from "./mutations";
4+
5+
export default {
6+
state: {},
7+
actions,
8+
mutations,
9+
getters
10+
};

app/store/population/mutations.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const mutations = {
2+
3+
};
4+
5+
export default mutations;

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"nativescript-dev-webpack": "~0.21.0",
2525
"nativescript-vue-template-compiler": "~2.2.0",
2626
"node-sass": "~4.12.0",
27-
"vue-loader": "~15.4.0"
27+
"vue-loader": "~15.4.0",
28+
"vuex": "^3.1.1"
2829
},
2930
"gitHead": "c175016cf900d406d2428bb6c4fcbb62093fb351",
3031
"readme": "NativeScript Application"

0 commit comments

Comments
 (0)