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

fix: 🚑 tl not showing up

This commit is contained in:
ThatOneCalculator 2022-09-09 13:31:48 -07:00
parent 3143f457ec
commit 86d6fe7b04
3 changed files with 5 additions and 15 deletions

View file

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.118.1-calc.2-rc.18",
"version": "12.118.1-calc.2-rc.19",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -62,7 +62,7 @@ const props = defineProps<{
// let tab = $ref('featured');
const tab = $computed({
get: () => getSrc(),
get: () => $ref('featured'),
set: (x) => {
syncSlide(['featured', 'users', 'search'].indexOf(x));
},
@ -120,10 +120,4 @@ function syncSlide(index) {
swiperRef.slideTo(index);
}
function getSrc() {
const dSrc = $ref('featured');
syncSlide(dSrc);
return dSrc;
}
</script>

View file

@ -127,7 +127,7 @@ const rootEl = $ref<HTMLElement>();
let queue = $ref(0);
const src = $computed({
get: () => getSrc(),
get: () => defaultStore.state.tl.src,
set: (x) => {
saveSrc(x);
syncSlide(timelines.indexOf(x));
@ -278,12 +278,6 @@ function setSwiperRef(swiper) {
swiperRef = swiper;
}
function getSrc(): 'home' | 'local' | 'recommended' | 'social' | 'global' {
const dSrc = defaultStore.state.tl.src;
syncSlide(dSrc);
return dSrc;
}
function onSlideChange() {
saveSrc(timelines[swiperRef.activeIndex]);
}
@ -292,6 +286,8 @@ function syncSlide(index) {
swiperRef.slideTo(index);
}
syncSlide(timelines.indexOf(src));
</script>
<style lang="scss" scoped>