feat(i18n): use compact number format on actions (#683)

This commit is contained in:
Joaquín Sánchez 2023-01-01 22:45:46 +01:00 committed by GitHub
parent d4268cfff8
commit b8c7ed8157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 6 deletions

View file

@ -17,6 +17,10 @@ defineOptions({
inheritAttrs: false,
})
defineSlots<{
text: {}
}>()
const el = ref<HTMLDivElement>()
useCommand({
@ -58,10 +62,14 @@ useCommand({
</div>
</CommonTooltip>
<CommonAnimateNumber v-if="text !== undefined" :increased="active" text-sm>
<span text-secondary-light>{{ text }}</span>
<CommonAnimateNumber v-if="text !== undefined || $slots.text" :increased="active" text-sm>
<span text-secondary-light>
<slot name="text">{{ text }}</slot>
</span>
<template #next>
<span :class="[color]">{{ text }}</span>
<span :class="[color]">
<slot name="text">{{ text }}</slot>
</span>
</template>
</CommonAnimateNumber>
</component>