mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-04 19:57:26 +00:00
337dd97b49
* perf(#10923): unwind css module class name * perf(#10923): support multiple components * refactor: clean up * refactor(#10923): avoid `useCssModule()` * fix(#10923): allow direct literal class name * fix(#10923): avoid computed class name * fix(#10923): allow literal keys * fix(#10923): typo * fix(#10923): invalid class names * chore: test * revert: test This reverts commit 5c7ef366eceebe8ba260efa4d5d675f6c1775c45. * fix(#10923): hidden tale * perf(#10923): also unwind scoped css contained components * perf(#10923): `normalizeClass` AOT compilation --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
51 lines
975 B
Vue
51 lines
975 B
Vue
<template>
|
|
<MkTooltip ref="tooltip" :showing="showing" :targetElement="targetElement" :maxWidth="250" @closed="emit('closed')">
|
|
<div :class="$style.root">
|
|
<div v-for="u in users" :key="u.id" :class="$style.user">
|
|
<MkAvatar :class="$style.avatar" :user="u"/>
|
|
<MkUserName :user="u" :nowrap="true"/>
|
|
</div>
|
|
<div v-if="users.length < count">+{{ count - users.length }}</div>
|
|
</div>
|
|
</MkTooltip>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { } from 'vue';
|
|
import MkTooltip from './MkTooltip.vue';
|
|
|
|
defineProps<{
|
|
showing: boolean;
|
|
users: any[]; // TODO
|
|
count: number;
|
|
targetElement: HTMLElement;
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
(ev: 'closed'): void;
|
|
}>();
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
.root {
|
|
font-size: 0.9em;
|
|
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;
|
|
}
|
|
</style>
|