feat: 宠物档案管理
This commit is contained in:
1 parent
6074180a1a
commit
a55a6d3586
9 files changed
+129
-144
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user