feat: 宠物档案管理

This commit is contained in:
ilhamtahir committed 2025-01-19 22:23:53 +08:00
1 parent 6074180a1a
commit a55a6d3586
9 files changed
+129 -144

No files matched your search

+8
View File
@@ -1,3 +1,4 @@
import { createPet } from '@/api/pet'
import {
type CreateFeedingPlanRequest,
type CreatePetRequest,
@@ -57,11 +58,18 @@ export const useFeedingPlanStore = defineStore('feeding-plan', () => {
pet.value[key] = (value as CreatePetRequest[keyof CreatePetRequest])
}
const persistentPet = async () => {
await createPet({
...pet.value,
})
}
return {
pet,
petTypeOptions,
genderOptions,
setPetValue,
persistentPet,
petTags,
feedingPlan,
feedingGoalOptions,