From 9fe938f390813395876b333cbebe8fa442aca102 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 25 Oct 2022 12:01:41 -0700 Subject: [PATCH] testtt --- package.json | 2 +- packages/client/src/pages/explore.vue | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b9b24cd1a..95f339822 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.119.0-calc.1-rc.9.7", + "version": "12.119.0-calc.1-rc.9.8", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/explore.vue b/packages/client/src/pages/explore.vue index 24dcbf4f9..3edcc4325 100644 --- a/packages/client/src/pages/explore.vue +++ b/packages/client/src/pages/explore.vue @@ -63,12 +63,11 @@ const props = defineProps<{ const tabs = ['featured', 'users', 'search']; -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +const emit = defineEmits<{ + (ev: 'update:tab', key: string); +}>(); + +let tab = $ref('featured'); let tagsEl = $ref>(); let searchQuery = $ref(null); let searchOrigin = $ref('combined'); @@ -115,7 +114,10 @@ function setSwiperRef(swiper) { } function onSlideChange() { - tab = tabs[swiperRef.activeIndex + 1]; + // tab = tabs[swiperRef.activeIndex]; + let theTab = tabs[swiperRef.activeIndex]; + console.log(theTab); + emit('update:tab', theTab); } function syncSlide(index) {