Skip to content

Commit 444b873

Browse files
committed
fix: type
1 parent 1fc925a commit 444b873

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/layout/AppDrawerItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const title = toRef(() => item.meta?.title)
1616
const icon = toRef(() => item.meta?.icon)
1717
// @ts-expect-error unknown type miss match
1818
const to = computed<RouteRecordRaw>(() => ({
19-
name: item.name || visibleChildren.value?.[0].name,
19+
name: item.name || visibleChildren.value?.[0]?.name,
2020
}))
2121
</script>
2222

src/components/layout/ButtonSettings.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ const theme = useTheme()
66
const { store } = useColorMode()
77
const color = computed({
88
get() {
9-
return theme.themes.value.light.colors.primary
9+
return theme.themes.value.light!.colors.primary
1010
},
1111
set(val: string) {
1212
localStorage.setItem('theme-primary', val)
13-
theme.themes.value.light.colors.primary = val
14-
theme.themes.value.dark.colors.primary = val
13+
theme.themes.value.light!.colors.primary = val
14+
theme.themes.value.dark!.colors.primary = val
1515
},
1616
})
1717
const colors = [

src/layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import { useTitle } from '@vueuse/core'
1212
const route = useRoute()
1313
const title = computed(() => {
14-
const title = route.meta?.title || route.matched[0].meta?.title || ''
14+
const title = route.meta?.title || route.matched[0]?.meta?.title || ''
1515
return title ? `${title} | Vitify Admin` : 'Vitify Admin'
1616
})
1717
useTitle(title)

0 commit comments

Comments
 (0)