sync on mounted

This commit is contained in:
ThatOneCalculator 2022-11-09 16:56:33 -08:00
parent 4c2f8932a6
commit a8a81e8675

View File

@ -62,7 +62,7 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, computed, watch, ref } from 'vue';
import { computed, watch, ref, onMounted } from 'vue';
import { Virtual } from 'swiper';
import { Swiper, SwiperSlide } from 'swiper/vue';
import XTutorial from '@/components/MkTutorialDialog.vue';
@ -287,6 +287,10 @@ function syncSlide(index) {
swiperRef.slideTo(index);
}
onMounted(() => {
syncSlide(timelines.indexOf(swiperRef.activeIndex));
}
</script>
<style lang="scss" scoped>