This commit is contained in:
2022-09-27 14:52:24 +02:00
parent 84412822ff
commit 95f7c2a4d9
3 changed files with 11 additions and 20 deletions
+4 -19
View File
@@ -42,7 +42,9 @@ export default defineComponent({
required: true,
},
},
mixins: [returnBtnMixin, modalTrainMixin],
setup(props) {
const store = useStore();
const searchedTrain = inject('searchedTrain') as Ref<string>;
@@ -50,6 +52,7 @@ export default defineComponent({
const currentTrains = computed(() => {
return props.trains;
});
return {
searchedTrain,
searchedDriver,
@@ -64,6 +67,7 @@ export default defineComponent({
),
};
},
activated() {
const query = this.$route.query;
if (query.trainNo && query.driverName) {
@@ -74,25 +78,6 @@ export default defineComponent({
}, 20);
}
},
methods: {
enter(el: HTMLElement) {
const maxHeight = getComputedStyle(el).height;
el.style.height = '0px';
getComputedStyle(el);
setTimeout(() => {
el.style.height = maxHeight;
}, 10);
},
afterEnter(el: HTMLElement) {
el.style.height = 'auto';
},
leave(el: HTMLElement) {
el.style.height = getComputedStyle(el).height;
setTimeout(() => {
el.style.height = '0px';
}, 10);
},
},
});
</script>