1
0
Fork 1
mirror of https://example.com synced 2024-11-23 22:36:38 +09:00

fix: 🐛 add script to pages view

This commit is contained in:
ThatOneCalculator 2022-09-09 15:51:43 -07:00
parent e748a79165
commit 09996374e4

View file

@ -95,6 +95,21 @@ definePageMetadata(computed(() => ({
title: i18n.ts.pages,
icon: 'fas fa-sticky-note',
})));
let swiperRef = null;
function setSwiperRef(swiper) {
swiperRef = swiper;
syncSlide(tabs.indexOf(tab));
}
function onSlideChange() {
tab = tabs[swiperRef.activeIndex];
}
function syncSlide(index) {
swiperRef.slideTo(index);
}
</script>
<style lang="scss" scoped>