mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
ripping my hair out
This commit is contained in:
parent
9fe938f390
commit
2dc0be933c
2 changed files with 12 additions and 7 deletions
|
@ -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",
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue