feat: basic interactive & tags
This commit is contained in:
20
src/stores/recipe.ts
Normal file
20
src/stores/recipe.ts
Normal 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))
|
||||
Reference in New Issue
Block a user