mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-02 21:08:12 +00:00
31 lines
571 B
TypeScript
31 lines
571 B
TypeScript
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;
|
|
},
|
|
},
|
|
});
|