mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Naprawiono odnośnik do pociągu na liście rozkładów scenerii
This commit is contained in:
@@ -38,7 +38,6 @@ export default defineComponent({
|
||||
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
const queryTrain = inject('queryTrain') as Ref<string>;
|
||||
|
||||
const sorterOptions = [
|
||||
{
|
||||
@@ -72,36 +71,18 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
translatedSorterOptions,
|
||||
queryTrain,
|
||||
searchedTrain: inject('searchedTrain') as string,
|
||||
searchedDriver: inject('searchedDriver') as string,
|
||||
sorterActive: inject('sorterActive') as { id: string | number; dir: number },
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.queryTrain) {
|
||||
this.searchedTrain = this.queryTrain;
|
||||
this.searchedDriver = '';
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeSorter(item: { id: string | number; value: string }) {
|
||||
this.sorterActive.id = item.id;
|
||||
this.sorterActive.dir = -1;
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
queryTrain(train: string) {
|
||||
if (!train) return;
|
||||
if (train == '') return;
|
||||
|
||||
this.searchedTrain = train;
|
||||
this.searchedDriver = '';
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user