feat(Nav): add dark mode btn

This commit is contained in:
thehrz 2023-07-11 15:39:05 +08:00
parent 94f1c42a4e
commit 91d1bb45e6
No known key found for this signature in database
GPG Key ID: 683658B4CAC43158

View File

@ -1,26 +1,47 @@
<script lang="ts">
export default {
data: () => ({
pages: [
{
title: '教师',
page: '/teachers',
},
{
title: '事件',
page: '/events',
},
{
title: '文章',
page: '/posts',
},
{
title: '关于',
page: '/about',
},
],
}),
}
<script lang="ts" setup>
// export default {
// data: () => ({
// pages: [
// {
// title: '',
// page: '/teachers',
// },
// {
// title: '',
// page: '/events',
// },
// {
// title: '',
// page: '/posts',
// },
// {
// title: '',
// page: '/about',
// },
// ],
// }),
// }
const pages = [
{
title: '教师',
page: '/teachers',
},
{
title: '事件',
page: '/events',
},
{
title: '文章',
page: '/posts',
},
{
title: '关于',
page: '/about',
},
]
const { t } = useI18n()
</script>
<template>
@ -41,6 +62,11 @@ export default {
<v-spacer />
<v-btn
class="mx-2" :title="t('button.toggle_dark')" :icon="isDark ? 'mdi-weather-night' : 'mdi-weather-sunny'"
@click="toggleDark()"
/>
<v-menu>
<template #activator="{ props }">
<v-app-bar-nav-icon v-bind="props" class="md:hidden!" />