feat: bg-base-100 bg-base-cotent

This commit is contained in:
Alisa | Side.one
2023-05-05 08:37:12 +08:00
parent d39b4caf16
commit 51c173e82d
7 changed files with 84 additions and 60 deletions
@@ -22,13 +22,13 @@ watch(locale, (val) => {
document.documentElement.setAttribute('lang', val as string);
});
const currentLang = ref([localStorage.getItem('lang') || 'en']);
const currentLang = ref(localStorage.getItem('lang') || 'en');
</script>
<template>
<div class="dropdown dropdown-end">
<label tabindex="0" class="btn btn-ghost btn-circle btn-sm mx-1">
<Icon icon="mdi-translate" style="font-size: 24px" />
<Icon icon="mdi-translate" class="text-2xl" />
</label>
<ul
tabindex="0"
@@ -36,6 +36,8 @@ const currentLang = ref([localStorage.getItem('lang') || 'en']);
>
<li v-for="lang in props.languages" :key="lang.i18nLang">
<a
class="hover:bg-base-content"
:class="{ 'text-primary': currentLang === lang.i18nLang }"
@click="
locale = lang.i18nLang;
$emit('change', lang.i18nLang);