BUG | useTimeoutFn | 组件卸载后不会清除
#5028
Unanswered
WangJincheng4869
asked this question in
Q&A
Replies: 1 comment 5 replies
-
|
I think the problem is that you cant use a composable like this. The |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
组件卸载后不会清除
setTimeout,虽然里面调用了tryOnScopeDispose(stop),但是组件卸载后依旧存在。可以打开控制查看日志信息,隐藏后依旧会继续输出日志。
Reproduction
https://playground.vueuse.org/#eNqFU81u00AQfpVlL3HUYJfAqXKilqpIIASolJsvxpk4bte71v6ESJbPcEFwA3FEPAUH3oYCb8Hsbuw4UpIeLHnn+2bm+2Zna3pWVeHSAD2hscpkUWmiQJuKsJTnk4RqldBpwouyElKTmuiiBKXTshoRo+B5qvT5Apkwc+crRM9yQRoyl6Ikg1OsjOEoExIGXZVzUVZrQhjZgxWwgWuiFilj4t0lzLtKnpHwTHClScEro8mkRwy0NDBMeBx5F6gZDxrKiqUa8ERI/NZoLTg5zViR3aC3tso994M+f394f/vx++3XX39+/Pz37fPfL5/iyCf5Ak748n4xb5MTSiKE4qjXiI5waChzXuThtRIcJ1vb7IRmmF4wkC8rXaCNhJ4Qh1jM+XjmYtbJqI1nC8hudsSv1crGEvpKggK5hIR2mE5lDqjNwhevX8AK/zuwFDPDkH0AvAQlmLEaPe2x4TOU3eM5tU/ddRU8v1IXKw1ctaasUMtsHD+heHd2cvusb+Q+DB+5vIQ3OMV2Mw6vpuztzXoDhdFP+J4d7NMFf8NLYbiG2fae9Un7dhE59tu7j8fDDWwfjdyGHdpj4KNCQjAkkylOBuOEWEQwCJnIg4ElDFwS8d3CZcoMHB35UN95YLkj8uD42Gto2lY2vqvx+M7O4wOtnTkfshZBr4U4GeNdOnpzD4LhZNp2ZZDKLnlT1Sd3ul1Zb2Pz2NdY78G7kvGsWE7ren0/TRNHNuBTt6i0+Q8X48W2
System Info
System: OS: Windows 11 10.0.26100 CPU: (16) x64 AMD Ryzen 9 7940H w/ Radeon 780M Graphics Memory: 9.70 GB / 31.22 GB Binaries: Node: 22.17.1 - D:\Program Files\nodejs\node.EXE npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD pnpm: 10.15.1 - D:\Users\jcwang\AppData\Roaming\npm\pnpm.CMD Browsers: Edge: Chromium (133.0.3065.69) Internet Explorer: 11.0.26100.1882 npmPackages: @vueuse/components: ^13.9.0 => 13.9.0 @vueuse/core: ^13.9.0 => 13.9.0 @vueuse/integrations: ^13.9.0 => 13.9.0 vue: ^3.5.21 => 3.5.21Used Package Manager
pnpm
Validations
Beta Was this translation helpful? Give feedback.
All reactions