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>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||
import { endpoints, packed } from "magnetar-common";
|
||||
import MagPagination, { Paging } from "@/components/MagPagination.vue";
|
||||
import { reactive, watch } from "vue";
|
||||
|
||||
const props = defineProps<{
|
||||
user: packed.PackUserBase;
|
||||
type: "following" | "followers";
|
||||
}>();
|
||||
|
||||
const followingPagination: Paging = {
|
||||
const followingPagination: Paging<typeof endpoints.GetFollowingById> = reactive(
|
||||
{
|
||||
endpoint: endpoints.GetFollowingById,
|
||||
limit: 20,
|
||||
pathParams: computed(() => ({
|
||||
pathParams: {
|
||||
id: props.user.id,
|
||||
})),
|
||||
},
|
||||
params: {},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
const followersPagination: Paging = {
|
||||
const followersPagination: Paging<typeof endpoints.GetFollowersById> = reactive(
|
||||
{
|
||||
endpoint: endpoints.GetFollowersById,
|
||||
limit: 20,
|
||||
pathParams: computed(() => ({
|
||||
pathParams: {
|
||||
id: props.user.id,
|
||||
})),
|
||||
},
|
||||
params: {},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.user.id,
|
||||
(val) => {
|
||||
followingPagination.pathParams.id = val;
|
||||
followersPagination.pathParams.id = val;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in New Issue