feat: add tools select

This commit is contained in:
YunYouJun
2022-04-14 23:56:45 +08:00
parent 56ad10ef07
commit ca86612bdc
8 changed files with 115 additions and 6 deletions

View File

@@ -2,6 +2,8 @@ import { acceptHMRUpdate, defineStore } from 'pinia'
export const useRecipeStore = defineStore('recipe', () => {
const curStuff = ref(new Set<string>())
const curTool = ref('')
const selectedStuff = computed(() => Array.from(curStuff.value))
function toggleStuff(name: string) {
@@ -14,6 +16,7 @@ export const useRecipeStore = defineStore('recipe', () => {
}
return {
curTool,
selectedStuff,
toggleStuff,
}