aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-03-14 14:04:28 +0100
committerMateja <mail@matejamaric.com>2021-03-14 14:04:28 +0100
commit00abd5229c63b570af751406fc322e197c4f51c0 (patch)
treeabfaf8c7a26a29dab80e8589d3fcdb8350300b9f
parentc3a0c1a40262343e1c7e6ec9a0bba9772054ba6d (diff)
downloadyota-laravel-00abd5229c63b570af751406fc322e197c4f51c0.tar.gz
yota-laravel-00abd5229c63b570af751406fc322e197c4f51c0.zip
Better import/export.
-rw-r--r--resources/js/app.js4
-rw-r--r--resources/js/components/call-sign-filter.vue10
-rw-r--r--resources/js/store.js4
3 files changed, 5 insertions, 13 deletions
diff --git a/resources/js/app.js b/resources/js/app.js
index 360abf8..efea4b1 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -4,10 +4,6 @@ import Vue from 'vue';
import store from './store.js';
-//window.Vue = require('vue');
-//window.Vuex = require('vuex');
-//Vue.use(Vuex);
-
import callSignFilter from './components/call-sign-filter.vue';
import callSignDesc from './components/call-sign-description.vue';
diff --git a/resources/js/components/call-sign-filter.vue b/resources/js/components/call-sign-filter.vue
index 658b0d2..07d339d 100644
--- a/resources/js/components/call-sign-filter.vue
+++ b/resources/js/components/call-sign-filter.vue
@@ -6,23 +6,21 @@
</template>
<script>
-import store from '../store.js';
-
export default {
mounted() {
- store.dispatch('fillSigns');
+ this.$store.dispatch('fillSigns');
},
computed: {
selected: {
get() {
- return store.getters.getSelectedSign;
+ return this.$store.getters.getSelectedSign;
},
set(value) {
- store.dispatch('setSelectedSign', value);
+ this.$store.dispatch('setSelectedSign', value);
}
},
options() {
- return store.getters.getSigns;
+ return this.$store.getters.getSigns;
}
}
}
diff --git a/resources/js/store.js b/resources/js/store.js
index 33b7469..461b34e 100644
--- a/resources/js/store.js
+++ b/resources/js/store.js
@@ -2,7 +2,7 @@ import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
-const store = new Vuex.Store({
+export default new Vuex.Store({
state: {
selectedSign: "all",
callSigns: [],
@@ -34,5 +34,3 @@ const store = new Vuex.Store({
}
}
});
-
-export default store;