feat: add history

This commit is contained in:
YunYouJun
2023-11-07 01:59:29 +08:00
parent 7d26f9ba84
commit bfb6ea3e14
11 changed files with 121 additions and 13 deletions

View File

@@ -0,0 +1,10 @@
import { useStorage } from '@vueuse/core'
import { namespace } from '~/constants'
import type { RecipeItem } from '~/types'
export interface RecipeHistoryItem {
recipe: RecipeItem
time: number
}
export const recipeHistories = useStorage<RecipeHistoryItem[]>(`${namespace}:history`, [])