fix: 🚑 tl not showing up
This commit is contained in:
parent
3143f457ec
commit
86d6fe7b04
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.118.1-calc.2-rc.18",
|
"version": "12.118.1-calc.2-rc.19",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -62,7 +62,7 @@ const props = defineProps<{
|
||||||
// let tab = $ref('featured');
|
// let tab = $ref('featured');
|
||||||
|
|
||||||
const tab = $computed({
|
const tab = $computed({
|
||||||
get: () => getSrc(),
|
get: () => $ref('featured'),
|
||||||
set: (x) => {
|
set: (x) => {
|
||||||
syncSlide(['featured', 'users', 'search'].indexOf(x));
|
syncSlide(['featured', 'users', 'search'].indexOf(x));
|
||||||
},
|
},
|
||||||
|
@ -120,10 +120,4 @@ function syncSlide(index) {
|
||||||
swiperRef.slideTo(index);
|
swiperRef.slideTo(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSrc() {
|
|
||||||
const dSrc = $ref('featured');
|
|
||||||
syncSlide(dSrc);
|
|
||||||
return dSrc;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -127,7 +127,7 @@ const rootEl = $ref<HTMLElement>();
|
||||||
|
|
||||||
let queue = $ref(0);
|
let queue = $ref(0);
|
||||||
const src = $computed({
|
const src = $computed({
|
||||||
get: () => getSrc(),
|
get: () => defaultStore.state.tl.src,
|
||||||
set: (x) => {
|
set: (x) => {
|
||||||
saveSrc(x);
|
saveSrc(x);
|
||||||
syncSlide(timelines.indexOf(x));
|
syncSlide(timelines.indexOf(x));
|
||||||
|
@ -278,12 +278,6 @@ function setSwiperRef(swiper) {
|
||||||
swiperRef = swiper;
|
swiperRef = swiper;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSrc(): 'home' | 'local' | 'recommended' | 'social' | 'global' {
|
|
||||||
const dSrc = defaultStore.state.tl.src;
|
|
||||||
syncSlide(dSrc);
|
|
||||||
return dSrc;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSlideChange() {
|
function onSlideChange() {
|
||||||
saveSrc(timelines[swiperRef.activeIndex]);
|
saveSrc(timelines[swiperRef.activeIndex]);
|
||||||
}
|
}
|
||||||
|
@ -292,6 +286,8 @@ function syncSlide(index) {
|
||||||
swiperRef.slideTo(index);
|
swiperRef.slideTo(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
syncSlide(timelines.indexOf(src));
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue