2021-11-12 06:15:14 -08:00
|
|
|
<template>
|
2021-11-13 20:13:22 -08:00
|
|
|
<MkTooltip :source="source" ref="tooltip" @closed="$emit('closed')" :max-width="250">
|
|
|
|
<div class="beaffaef">
|
|
|
|
<div class="user" v-for="u in users" :key="u.id">
|
|
|
|
<MkAvatar class="avatar" :user="u"/>
|
|
|
|
<MkUserName class="name" :user="u" :nowrap="true"/>
|
|
|
|
</div>
|
|
|
|
<div v-if="users.length < count" class="omitted">+{{ count - users.length }}</div>
|
2021-11-12 06:15:14 -08:00
|
|
|
</div>
|
|
|
|
</MkTooltip>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
import MkTooltip from './ui/tooltip.vue';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkTooltip,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
users: {
|
|
|
|
type: Array,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
count: {
|
|
|
|
type: Number,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
source: {
|
|
|
|
required: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
emits: ['closed'],
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-11-13 20:13:22 -08:00
|
|
|
.beaffaef {
|
2021-11-12 06:15:14 -08:00
|
|
|
font-size: 0.9em;
|
2021-11-13 20:13:22 -08: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 06:15:14 -08:00
|
|
|
}
|
|
|
|
</style>
|