diff --git a/otherPages/userManage/pet/components/petHealthInfo.vue b/otherPages/userManage/pet/components/petHealthInfo.vue
index e9af5bb..a0a4b4c 100644
--- a/otherPages/userManage/pet/components/petHealthInfo.vue
+++ b/otherPages/userManage/pet/components/petHealthInfo.vue
@@ -66,14 +66,14 @@
-->
-
-
-
-
+
+
+
+
@@ -105,7 +105,7 @@
});
// 定义 emits
- const emits = defineEmits(['update:petHealthInfo']);
+ const emits = defineEmits(['update:petHealthInfo', 'updatePetHealthInfo']);
// 定义响应式数据
const showVaccine = ref(false);
@@ -176,25 +176,25 @@
};
const vaccineSelect = (e) => {
- props.petHealthInfo.vaccine = e.index;
+ props.petHealthInfo.vaccine = e.indexs[0];
showVaccine.value = false;
updatePetHealthInfo();
};
const expellingSelect = (e) => {
- props.petHealthInfo.deworm = e.index;
+ props.petHealthInfo.deworm = e.indexs[0];
showExpelling.value = false;
updatePetHealthInfo();
};
const sterilizationSelect = (e) => {
- props.petHealthInfo.neutered = e.index;
+ props.petHealthInfo.neutered = e.indexs[0];
showSterilization.value = false;
updatePetHealthInfo();
};
const dogSelect = (e) => {
- props.petHealthInfo.petCard = e.index;
+ props.petHealthInfo.petCard = e.indexs[0];
showDog.value = false;
updatePetHealthInfo();
};
@@ -216,7 +216,7 @@
updatePetHealthInfo();
};
- const updatePetHealthInfo = () => {
+ const updatePetHealthInfo = (map) => {
// 触发 update 事件,将修改后的 petHealthInfo 对象发送给父组件
emits('update:petHealthInfo', props.petHealthInfo);
};
@@ -231,7 +231,7 @@
});
-