mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
rework reaktywności danych z API i WS
This commit is contained in:
@@ -87,6 +87,19 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
|
||||
watch: {
|
||||
'$route.query': {
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
if (newVal.region) {
|
||||
const item = this.itemList.find((it) => it.id == newVal.region);
|
||||
|
||||
if (item) this.selectedItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
selectOption(item: Item) {
|
||||
this.selectedItem = item;
|
||||
|
||||
Reference in New Issue
Block a user