chore: fix typecheck

This commit is contained in:
YunYouJun
2023-08-20 05:02:20 +08:00
parent 94a9ff5007
commit e861c5bd65
4 changed files with 6 additions and 9 deletions

View File

@@ -1,18 +1,18 @@
<template>
<div>
<NuxtLink class="mx-2 icon-btn hover:text-orange-400" to="/help" title="帮助">
<NuxtLink class="icon-btn mx-2 hover:text-orange-400" to="/help" title="帮助">
<div i-ri-question-line />
</NuxtLink>
<NuxtLink class="mx-2 icon-btn hover:text-blue-400" to="/about" title="关于">
<NuxtLink class="icon-btn mx-2 hover:text-blue-400" to="/about" title="关于">
<div i-ri-information-line />
</NuxtLink>
<a class="mx-2 icon-btn hover:text-pink-400" rel="noreferrer" href="https://space.bilibili.com/1579790" target="_blank" title="BiliBili">
<a class="icon-btn mx-2 hover:text-pink-400" rel="noreferrer" href="https://space.bilibili.com/1579790" target="_blank" title="BiliBili">
<div i-ri-bilibili-line />
</a>
<a class="hover:text-black-400 mx-2 icon-btn" rel="noreferrer" href="https://github.com/YunYouJun/cook" target="_blank" title="GitHub">
<a class="icon-btn hover:text-black-400 mx-2" rel="noreferrer" href="https://github.com/YunYouJun/cook" target="_blank" title="GitHub">
<div i-ri-github-line />
</a>
</div>

View File

@@ -7,7 +7,7 @@ const props = defineProps<{
const recipes = ref<Cookbook['recipes']>(props.cookbook.recipes)
onMounted(async () => {
recipes.value = (await import('../../data/recipe.json')).default
recipes.value = ((await import('../../data/recipe.json')).default) as unknown as Cookbook['recipes']
})
</script>

View File

@@ -3,9 +3,6 @@ definePageMeta({
layout: 'child',
title: '自定义菜谱',
})
const route = useRoute()
const id = computed(() => route.query.id)
</script>
<template>

View File

@@ -15,7 +15,7 @@ export interface Cookbook {
/**
* 菜谱
*/
recipes: Recipes[]
recipes: Recipes
createdAt: string
updatedAt: string