feat: add nav more menu on mobile (#322)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
Ayaka Rizumu 2022-12-04 22:17:02 +08:00 committed by GitHub
parent 8f32b1ce22
commit cbd5867275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 237 additions and 54 deletions

View file

@ -7,22 +7,18 @@ const { locales } = useI18n() as { locales: ComputedRef<LocaleObject[]> }
</script>
<template>
<CommonTooltip :content="t('nav_footer.select_language')">
<CommonDropdown>
<button flex :aria-label="t('nav_footer.select_language')">
<div i-ri:earth-line text-lg />
</button>
<CommonDropdown>
<slot />
<template #popper>
<CommonDropdownItem
v-for="item in locales"
:key="item.code"
:checked="item.code === locale"
@click="setLocale(item.code)"
>
{{ item.name }}
</CommonDropdownItem>
</template>
</CommonDropdown>
</CommonTooltip>
<template #popper>
<CommonDropdownItem
v-for="item in locales"
:key="item.code"
:checked="item.code === locale"
@click="setLocale(item.code)"
>
{{ item.name }}
</CommonDropdownItem>
</template>
</CommonDropdown>
</template>