Fixed follow list view pagination
ci/woodpecker/push/ociImagePush Pipeline is running
Details
ci/woodpecker/push/ociImagePush Pipeline is running
Details
This commit is contained in:
parent
236502ad05
commit
66ce0de3fa
|
@ -22,33 +22,45 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
|
||||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||||
import { endpoints, packed } from "magnetar-common";
|
import { endpoints, packed } from "magnetar-common";
|
||||||
import MagPagination, { Paging } from "@/components/MagPagination.vue";
|
import MagPagination, { Paging } from "@/components/MagPagination.vue";
|
||||||
|
import { reactive, watch } from "vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: packed.PackUserBase;
|
user: packed.PackUserBase;
|
||||||
type: "following" | "followers";
|
type: "following" | "followers";
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const followingPagination: Paging = {
|
const followingPagination: Paging<typeof endpoints.GetFollowingById> = reactive(
|
||||||
|
{
|
||||||
endpoint: endpoints.GetFollowingById,
|
endpoint: endpoints.GetFollowingById,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
pathParams: computed(() => ({
|
pathParams: {
|
||||||
id: props.user.id,
|
id: props.user.id,
|
||||||
})),
|
},
|
||||||
params: {},
|
params: {},
|
||||||
};
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const followersPagination: Paging = {
|
const followersPagination: Paging<typeof endpoints.GetFollowersById> = reactive(
|
||||||
|
{
|
||||||
endpoint: endpoints.GetFollowersById,
|
endpoint: endpoints.GetFollowersById,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
pathParams: computed(() => ({
|
pathParams: {
|
||||||
id: props.user.id,
|
id: props.user.id,
|
||||||
})),
|
},
|
||||||
params: {},
|
params: {},
|
||||||
};
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.user.id,
|
||||||
|
(val) => {
|
||||||
|
followingPagination.pathParams.id = val;
|
||||||
|
followersPagination.pathParams.id = val;
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue