Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] FloatingBubble 双向绑定赋值bug #12726

Closed
hzlzsm opened this issue Mar 25, 2024 · 2 comments · Fixed by #12730
Closed

[Bug Report] FloatingBubble 双向绑定赋值bug #12726

hzlzsm opened this issue Mar 25, 2024 · 2 comments · Fixed by #12730
Labels

Comments

@hzlzsm
Copy link

hzlzsm commented Mar 25, 2024

重现链接

https://codesandbox.io/p/live/0902ff40-f37a-4317-aaeb-d586a11b106b

Vant 版本

4.8.7

描述一下你遇到的问题。

设置offset的初始值后再手动修改值不起作用,需要resize后才能生效

重现步骤

const offset = ref({ x: -1, y: -1 })
onMounted(() => {
offset.value.y = 600
})
float

设备/浏览器

No response

@hzlzsm
Copy link
Author

hzlzsm commented Mar 25, 2024

image
源码147行的 watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState);没有深度监听,deep:true。修改值没有触发监听。当前版本下,我只能在修改位置后再修改一次gap的值来触发该监听来达到目的

@inottn
Copy link
Collaborator

inottn commented Mar 25, 2024

感谢反馈,会在下个版本修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants