Commit 33304d5b authored by weishengfei's avatar weishengfei

refactor(views): 优化 My.vue 文件中的 babyId 获取逻辑

- 在寻找 selected 宝宝信息时,添加了对 allBabyBaseInfo 的空值合并操作
- 提高了代码的健壮性和可读性
parent 2c2a37a9
...@@ -421,7 +421,7 @@ onMounted(async () => { ...@@ -421,7 +421,7 @@ onMounted(async () => {
hideLoading(); hideLoading();
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find( babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find(
(item) => item.selected (item) => item.selected
)?.id; )?.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment