feat: basic interactive & tags

This commit is contained in:
YunYouJun
2022-04-14 19:59:02 +08:00
parent 2120e79726
commit 1fb7d8db94
15 changed files with 579 additions and 182 deletions

20
src/stores/recipe.ts Normal file
View File

@@ -0,0 +1,20 @@
import { acceptHMRUpdate, defineStore } from 'pinia'
export const useRecipeStore = defineStore('recipe', () => {
const curStuff = ref(new Set<string>())
function toggleStuff(name: string) {
if (curStuff.value.has(name))
curStuff.value.delete(name)
else
curStuff.value.add(name)
}
return {
curStuff,
toggleStuff,
}
})
if (import.meta.hot)
import.meta.hot.accept(acceptHMRUpdate(useRecipeStore, import.meta.hot))