2021-11-12 23:15:14 +09:00
|
|
|
<template>
|
2023-04-08 09:01:42 +09:00
|
|
|
<MkTooltip
|
|
|
|
ref="tooltip"
|
|
|
|
:target-element="targetElement"
|
|
|
|
:max-width="250"
|
|
|
|
@closed="emit('closed')"
|
|
|
|
>
|
|
|
|
<div class="beaffaef">
|
|
|
|
<div v-for="u in users" :key="u.id" class="user">
|
2023-04-29 10:39:48 +09:00
|
|
|
<MkAvatar class="avatar" :user="u" disableLink />
|
2023-04-08 09:01:42 +09:00
|
|
|
<MkUserName class="name" :user="u" :nowrap="true" />
|
|
|
|
</div>
|
|
|
|
<div v-if="users.length < count" class="omitted">
|
|
|
|
+{{ count - users.length }}
|
|
|
|
</div>
|
2021-11-14 13:13:22 +09:00
|
|
|
</div>
|
2023-04-08 09:01:42 +09:00
|
|
|
</MkTooltip>
|
2021-11-12 23:15:14 +09:00
|
|
|
</template>
|
|
|
|
|
2022-01-14 10:35:32 +09:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 09:01:42 +09:00
|
|
|
import {} from "vue";
|
|
|
|
import MkTooltip from "./MkTooltip.vue";
|
2021-11-12 23:15:14 +09:00
|
|
|
|
2022-01-14 10:35:32 +09:00
|
|
|
const props = defineProps<{
|
|
|
|
users: any[]; // TODO
|
|
|
|
count: number;
|
2022-01-31 21:07:33 +09:00
|
|
|
targetElement: HTMLElement;
|
2022-01-14 10:35:32 +09:00
|
|
|
}>();
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
2023-04-08 09:01:42 +09:00
|
|
|
(ev: "closed"): void;
|
2022-01-14 10:35:32 +09:00
|
|
|
}>();
|
2021-11-12 23:15:14 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-11-14 13:13:22 +09:00
|
|
|
.beaffaef {
|
2021-11-12 23:15:14 +09:00
|
|
|
font-size: 0.9em;
|
2021-11-14 13:13:22 +09:00
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
> .user {
|
|
|
|
line-height: 24px;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
margin-right: 3px;
|
|
|
|
}
|
|
|
|
}
|
2021-11-12 23:15:14 +09:00
|
|
|
}
|
|
|
|
</style>
|