misskey/packages/frontend/src/components/MkUserList.vue

40 lines
943 B
Vue
Raw Normal View History

<template>
<MkPagination :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/>
2022-07-20 22:24:26 +09:00
<div>{{ i18n.ts.noUsers }}</div>
</div>
</template>
<template #default="{ items }">
2023-05-08 10:32:08 +09:00
<div :class="$style.root">
<MkUserInfo v-for="item in items" :key="item.id" class="user" :user="extractor(item)"/>
</div>
</template>
</MkPagination>
</template>
<script lang="ts" setup>
import MkUserInfo from '@/components/MkUserInfo.vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
2022-07-20 22:24:26 +09:00
import { i18n } from '@/i18n';
import { infoImageUrl } from '@/instance';
const props = withDefaults(defineProps<{
pagination: Paging;
noGap?: boolean;
extractor?: (item: any) => any;
}>(), {
extractor: (item) => item,
});
</script>
2023-05-08 10:32:08 +09:00
<style lang="scss" module>
.root {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
grid-gap: var(--margin);
}
</style>