fix: 🐛 add script to pages view
This commit is contained in:
parent
e748a79165
commit
09996374e4
1 changed files with 15 additions and 0 deletions
|
@ -95,6 +95,21 @@ definePageMetadata(computed(() => ({
|
||||||
title: i18n.ts.pages,
|
title: i18n.ts.pages,
|
||||||
icon: 'fas fa-sticky-note',
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in a new issue