1
0
Fork 1
mirror of https://example.com synced 2024-11-23 05:06:41 +09:00

ripping my hair out

This commit is contained in:
ThatOneCalculator 2022-10-25 12:08:48 -07:00
parent 30df6ae75b
commit 373bcf9464
2 changed files with 12 additions and 7 deletions

View file

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

View file

@ -63,11 +63,12 @@ const props = defineProps<{
const tabs = ['featured', 'users', 'search'];
const emit = defineEmits<{
(ev: 'update:tab', key: string);
}>();
let tab = $ref('featured');
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tagsEl = $ref<InstanceType<typeof MkFolder>>();
let searchQuery = $ref(null);
let searchOrigin = $ref('combined');
@ -108,16 +109,20 @@ definePageMetadata(computed(() => ({
let swiperRef = null;
const emit = defineEmits<{
(ev: 'update:tab', key: string);
}>();
function setSwiperRef(swiper) {
swiperRef = swiper;
syncSlide(tabs.indexOf(tab));
}
function onSlideChange() {
// tab = tabs[swiperRef.activeIndex];
let theTab = tabs[swiperRef.activeIndex];
console.log(theTab);
emit('update:tab', theTab);
tab = theTab;
}
function syncSlide(index) {