mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 05:48:11 +00:00
Poprawki
This commit is contained in:
@@ -188,10 +188,8 @@ import {
|
|||||||
computed,
|
computed,
|
||||||
ComputedRef,
|
ComputedRef,
|
||||||
defineComponent,
|
defineComponent,
|
||||||
reactive,
|
|
||||||
Ref,
|
Ref,
|
||||||
ref,
|
ref,
|
||||||
watch,
|
|
||||||
} from "@vue/runtime-core";
|
} from "@vue/runtime-core";
|
||||||
import { useStore } from "@/store";
|
import { useStore } from "@/store";
|
||||||
import { GETTERS } from "@/constants/storeConstants";
|
import { GETTERS } from "@/constants/storeConstants";
|
||||||
@@ -263,39 +261,17 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const elList: Ref<(HTMLElement | null)[]> = ref([]);
|
const elList: Ref<(HTMLElement | null)[]> = ref([]);
|
||||||
|
|
||||||
// onBeforeUpdate(() => {
|
|
||||||
// elList.value.length = 0;
|
|
||||||
// observer.disconnect();
|
|
||||||
// });
|
|
||||||
|
|
||||||
const timetableDataStatus: ComputedRef<DataStatus> = computed(
|
const timetableDataStatus: ComputedRef<DataStatus> = computed(
|
||||||
() => store.getters[GETTERS.timetableDataStatus]
|
() => store.getters[GETTERS.timetableDataStatus]
|
||||||
);
|
);
|
||||||
|
|
||||||
const queryTimetable = computed(
|
const queryTimetable = computed(() => {
|
||||||
() =>
|
const q = props.computedTrains.find(
|
||||||
props.computedTrains.find(
|
(train) => train.trainNo === Number(props.queryTrain)
|
||||||
(train) => train.trainNo === Number(props.queryTrain)
|
)?.timetableData;
|
||||||
)?.timetableData
|
|
||||||
);
|
|
||||||
|
|
||||||
// watch(
|
return q;
|
||||||
// () => queryTimetable.value,
|
});
|
||||||
// (val, prevVal) => {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// const observer = new IntersectionObserver((entries) => {
|
|
||||||
// entries.forEach((entry) => {
|
|
||||||
// if (entry.isIntersecting) {
|
|
||||||
// (entry.target as HTMLElement).classList.add("visible");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// (entry.target as HTMLElement).classList.remove("visible");
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
elList,
|
elList,
|
||||||
@@ -316,14 +292,6 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// watch: {
|
|
||||||
// queryTimetable(timetable: Train["timetableData"]) {
|
|
||||||
// if (!timetable || !this.queryTrain) return;
|
|
||||||
|
|
||||||
// this.focusOnTrain(this.queryTrain);
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
enter(el: HTMLElement) {
|
enter(el: HTMLElement) {
|
||||||
const maxHeight = getComputedStyle(el).height;
|
const maxHeight = getComputedStyle(el).height;
|
||||||
|
|||||||
Reference in New Issue
Block a user