useSwiper

This commit is contained in:
ThatOneCalculator 2022-10-25 11:30:26 -07:00
parent 95bb87b29f
commit 42a7c07cee
2 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc.1-rc.9.4", "version": "12.119.0-calc.1-rc.9.5",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -40,7 +40,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, watch } from 'vue'; import { computed, watch } from 'vue';
import { Virtual } from 'swiper'; import { Virtual } from 'swiper';
import { Swiper, SwiperSlide } from 'swiper/vue'; import { Swiper, SwiperSlide, useSwiper } from 'swiper/vue';
import XFeatured from './explore.featured.vue'; import XFeatured from './explore.featured.vue';
import XUsers from './explore.users.vue'; import XUsers from './explore.users.vue';
import type MkFolder from '@/components/MkFolder.vue'; import type MkFolder from '@/components/MkFolder.vue';
@ -115,8 +115,7 @@ function setSwiperRef(swiper) {
} }
function onSlideChange() { function onSlideChange() {
tab = tabs[swiperRef.activeIndex]; tab = tabs[useSwiper().value.activeIndex];
console.log(tab);
console.log(tabs); console.log(tabs);
} }