Commit d58b9bf6 authored by 王炽's avatar 王炽

6666

parent b9cee113
......@@ -718,6 +718,27 @@ onMounted(async() => {
initData();
});
// 监听 visible 变化,设置页面滚动状态
watch(() => props.visible, (newVal) => {
// #ifdef MP-WEIXIN
if (newVal) {
// 弹窗展示时,禁止页面滚动
wx.setPageStyle({
style: {
overflow: 'hidden'
}
});
} else {
// 弹窗关闭时,恢复页面滚动
wx.setPageStyle({
style: {
overflow: 'auto'
}
});
}
// #endif
}, { immediate: true });
// 监听 babyStage 和 dueDate
watch(
() => [formData.value.babyStage, formData.value.babyBirthday],
......
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