fix??
This commit is contained in:
parent
21cd1162e3
commit
0d4fc974d9
4 changed files with 13 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.19-b17",
|
"version": "12.119.0-calc.19-b18",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import define from '../../../define.js';
|
|
||||||
import { GalleryPosts } from '@/models/index.js';
|
import { GalleryPosts } from '@/models/index.js';
|
||||||
|
import define from '../../../define.js';
|
||||||
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
|
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
@ -33,7 +33,7 @@ export const paramDef = {
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
|
||||||
.andWhere(`post.userId = :meId`, { meId: user.id });
|
.andWhere('post.userId = :meId', { meId: user.id });
|
||||||
|
|
||||||
const posts = await query
|
const posts = await query
|
||||||
.take(ps.limit)
|
.take(ps.limit)
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineComponent, watch } from 'vue';
|
import { computed, defineComponent, watch, onMounted } from 'vue';
|
||||||
import { Virtual } from 'swiper';
|
import { Virtual } from 'swiper';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
|
@ -137,6 +137,10 @@ function onSlideChange() {
|
||||||
function syncSlide(index) {
|
function syncSlide(index) {
|
||||||
swiperRef.slideTo(index);
|
swiperRef.slideTo(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
syncSlide(tabs.indexOf(swiperRef.activeIndex));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<swiper-slide>
|
<swiper-slide>
|
||||||
<div class="rknalgpo liked">
|
<div class="rknalgpo liked">
|
||||||
<MkPagination v-slot="{items}" :pagination="likedPagesPagination">
|
<MkPagination v-slot="{items}" :pagination="likedPagesPagination">
|
||||||
<MkPagePreview v-for="like in items" :key="like.id" class="ckltabjg" :page="like"/>
|
<MkPagePreview v-for="like in items" :key="like.page.id" class="ckltabjg" :page="like.page"/>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</div>
|
</div>
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
|
@ -116,6 +116,10 @@ function onSlideChange() {
|
||||||
function syncSlide(index) {
|
function syncSlide(index) {
|
||||||
swiperRef.slideTo(index);
|
swiperRef.slideTo(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
syncSlide(tabs.indexOf(swiperRef.activeIndex));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in a new issue