Skip to content

Commit b8c7570

Browse files
committed
fix: use $t auto-import instead of useI18n in DownloadButton
1 parent 1c7a680 commit b8c7570

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/components/Package/DownloadButton.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ const isOpen = shallowRef(false)
2020
const highlightedIndex = shallowRef(-1)
2121
const dropdownPosition = shallowRef<{ top: number; left: number } | null>(null)
2222
23-
const { t } = useI18n()
2423
const menuId = 'download-menu'
2524
const menuItems = computed(() => {
26-
const items = [{ id: 'package', label: t('package.download.package'), icon: 'i-lucide:package' }]
25+
const items = [{ id: 'package', labelKey: 'package.download.package', icon: 'i-lucide:package' }]
2726
if (props.dependencies?.length) {
2827
items.push({
2928
id: 'dependencies',
30-
label: t('package.download.dependencies'),
29+
labelKey: 'package.download.dependencies',
3130
icon: 'i-lucide:list-tree',
3231
})
3332
}
@@ -245,7 +244,7 @@ defineOptions({
245244
@mouseenter="highlightedIndex = index"
246245
>
247246
<span :class="item.icon" class="w-4 h-4" aria-hidden="true" />
248-
{{ item.label }}
247+
{{ $t(item.labelKey) }}
249248
</li>
250249
</ul>
251250
</Transition>

0 commit comments

Comments
 (0)