\r\n\r\n```\r\n\r\n> childView 子组件\r\n```js\r\nexport default {\r\n props: ['value'],\r\n emits: [\"input\"],\r\n setup(props, {emit}) {\r\n const nameProp = useVModel(props, \"value\", emit)\r\n useTimeout(1000, {\r\n callback: () => {\r\n nameProp.value = 'danke'\r\n }\r\n })\r\n}\r\n```\r\n\r\n2.x的项目 useVModel(props, \"value\", emit) 这样写的话 一直会出现不能更新值的问题 \r\n\r\n看了下源码 如果修改为useVModel(props, null, emit) key=null的时候 才可以测试通过 \r\n\r\n\r\n\r\n现在这样修改表现 但是觉得很奇怪。。。麻烦帮我看下这个问题 谢谢啦~\r\n```js\r\nexport default {\r\n props: ['value'],\r\n emits: [\"input\"],\r\n setup(props, {emit}) {\r\n const nameProp = useVModel(props, null , emit)\r\n useTimeout(1000, {\r\n callback: () => {\r\n nameProp.value = 'danke'\r\n }\r\n })\r\n}\r\n```\n\n### Reproduction\n\n见上述例子\n\n### System Info\n\n```Shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics\r\n Memory: 3.35 GB / 31.35 GB\r\n Binaries:\r\n Node: 16.20.1 - D:\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.18.0 - D:\\nodejs\\npm.CMD\r\n pnpm: 8.6.11 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (118.0.2088.76)\r\n Internet Explorer: 11.0.19041.1566\n```\n\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3523,"vue2.x下 使用useVModel 不能双向绑定","2024-01-09T03:23:43Z","https://github.com/vueuse/vueuse/issues/3523",0.7039156,{"description":3099,"labels":3100,"number":3101,"owner":3023,"repository":3023,"state":3053,"title":3102,"updated_at":3103,"url":3104,"score":3105},"### Describe the bug\r\n\r\n`useElementVisibility` triggers true when you are routing in the app, but it is working fine on the initial page load.\r\n\r\nBecause vue is generating the elements which going to be injected into the element. so the element exisits but the `getBoundingClientRect` returns all zero which cause the value to be `true` but the element hasn't been injected.\r\n\r\nTo resolve this issue, we also need to check if the element in the document.\r\n\r\n### Reproduction\r\n\r\nI tried to reproduce in vueuse playground, but failed. it is working fine. I am doubting it is because I am using Nuxt3 which is involving it's own routing mechanism. \r\n\r\nhttps://stackblitz.com/edit/vitejs-vite-vqeuqp?file=src/pages/Home.vue\r\n\r\nI will try again to reproduce it soon.\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)\r\n CPU: (6) x64 Intel(R) Xeon(R) CPU @ 2.20GHz\r\n Memory: 5.95 GB / 7.76 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 17.9.1 - ~/.nvm/versions/node/v17.9.1/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v17.9.1/bin/yarn\r\n npm: 8.11.0 - ~/.nvm/versions/node/v17.9.1/bin/npm\r\n Browsers:\r\n Firefox: 103.0.2\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\nyarn\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],2075,"`useElementVisibility` triggers true when in app routing in NuxtPage","2022-08-10T21:38:01Z","https://github.com/vueuse/vueuse/issues/2075",0.7040273,["Reactive",3107],{},["Set"],["ShallowReactive",3110],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f7uOQ_VvhAhgVnRTun24Jvt2k0bmqf19Sn0hRD1htZqQ":-1},"/vueuse/vueuse/4875"]