ci: fix typecheck & store test

This commit is contained in:
YunYouJun
2023-07-30 04:23:47 +08:00
parent 7d8677666b
commit a419c383a3
14 changed files with 221 additions and 37 deletions

View File

@@ -1,10 +1,11 @@
import { acceptHMRUpdate, defineStore } from 'pinia'
import { useStorage } from '@vueuse/core'
import { computed, ref } from 'vue'
import { useGtm } from '@gtm-support/vue-gtm'
import recipeData from '../../data/recipe.json'
import type { StuffItem } from '../../data/food'
import type { RecipeItem, Recipes } from '~/types'
import recipeData from '~/data/recipe.json'
import type { StuffItem } from '~/data/food'
const namespace = 'cook'
/**
@@ -25,6 +26,7 @@ export type SearchMode = 'survival' | 'loose' | 'strict'
export const useRecipeStore = defineStore('recipe', () => {
const recipes = recipeData as Recipes
const gtm = useGtm()
/**
* 搜索关键字
@@ -81,8 +83,6 @@ export const useRecipeStore = defineStore('recipe', () => {
const randomRecipe = ref<RecipeItem>(generateRandomRecipe(recipes))
const gtm = useGtm()
// 默认严格模式
const displayedRecipe = computed(() => {
if (keyword.value)