Cleanup c.d.

This commit is contained in:
2022-08-27 14:05:35 +02:00
parent aae51d4139
commit 6dd8cb2dad
3 changed files with 138 additions and 148 deletions
+26 -30
View File
@@ -1,30 +1,26 @@
import { defineComponent } from 'vue';
import { useStore } from '../store/store';
export default defineComponent({
setup() {
return {
store: useStore(),
};
},
mounted() {
console.log('Mixin mounted');
},
computed: {
chosenTrain() {
return this.store.trainList.find((train) => train.trainId == this.store.chosenModalTrainId);
},
},
methods: {
selectModalTrain(trainId: string) {
this.store.chosenModalTrainId = trainId;
},
closeModal() {
this.store.chosenModalTrainId = undefined;
},
},
});
import { defineComponent } from 'vue';
import { useStore } from '../store/store';
export default defineComponent({
setup() {
return {
store: useStore(),
};
},
computed: {
chosenTrain() {
return this.store.trainList.find((train) => train.trainId == this.store.chosenModalTrainId);
},
},
methods: {
selectModalTrain(trainId: string) {
this.store.chosenModalTrainId = trainId;
},
closeModal() {
this.store.chosenModalTrainId = undefined;
},
},
});