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```Shell\nChrome Version 137.0.7151.69\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.",[],4831,"BUG | `playground` | 在线代码无法解析","2025-06-23T09:10:07Z","https://github.com/vueuse/vueuse/issues/4831",0.72890437,{"description":2965,"labels":2966,"number":2968,"owner":2925,"repository":2925,"state":2935,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Clear and concise description of the problem\n\nIn some cases, you need to synchronize as much time as possible with the server, and the client's time is not completely reliable, in which case it may be possible to add a time for synchronization.\n\n### Suggested solution\n\nAdd a `syncTime` option.\n\n### Alternative\n\n_No response_\n\n### Additional context\n\n_No response_\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 that request the same feature to avoid creating a duplicate.",[2967],{"name":2922,"color":2923},4057,"`useNow` add a `syncTime` option","2025-02-18T14:55:05Z","https://github.com/vueuse/vueuse/issues/4057",0.7294554,{"description":2974,"labels":2975,"number":2977,"owner":2925,"repository":2925,"state":2935,"title":2978,"updated_at":2979,"url":2980,"score":2981},"### Clear and concise description of the problem\r\n\r\nI stumbled into this because I expected that for sure `useRouteQuery` would allow deserialization AND serialization transforms in order to store any arbitrary state in the query string.\r\n\r\nIn my case, I had local refs for `startDate` and `endDate` as JavaScript dates. I decided I wanted to persist these dates into the query string. The thing is, `useRouteQuery` only allows one-way transforms. That is, if I wanted to store the default value as a `YYYY-MM-DD`, and then deserialize to `Date`, that seems fine. However, this utility is extremely limited, because I could not control serializing the date BACK into the querystring. (It just defaults to JavaScript's crap date serialization i.e. `?startDate=Mon+Apr+15+2024+14:29:33+GMT-0700+(Pacific+Daylight+Time)`)\r\n\r\n### Suggested solution\r\n\r\nAllow two-way transforms i.e. serialization. I'd suggest something like:\r\n\r\n```ts\r\nuseRouteQuery(\r\n 'startDate',\r\n '2024-05-08',\r\n {\r\n from(value: string) { // or fromQueryString()? or just transform() how it is now?\r\n return dayjs(value).toDate()\r\n }\r\n to(value: Date) { // or toQueryString()? or transformTo()?\r\n return dayjs(value).format('YYYY-MM-DD')\r\n }\r\n }\r\n```\r\n\r\n### Alternative\r\n\r\nI don't see any alternatives immediately, other than using a different library or a drastically different approach.\r\n\r\n### Additional context\r\n\r\n_No response_\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 that request the same feature to avoid creating a duplicate.",[2976],{"name":2922,"color":2923},3970,"`useRouteQuery` can only custom deserialize but cannot custom serialize","2024-12-21T02:36:27Z","https://github.com/vueuse/vueuse/issues/3970",0.7318999,{"description":2983,"labels":2984,"number":2985,"owner":2925,"repository":2925,"state":2935,"title":2986,"updated_at":2987,"url":2988,"score":2989},"### Describe the bug\n\nAccording to the type (`export type UrlParams = Record\u003Cstring, string[] | string>`) a parameter is either a `string` or a `string[]`, but if the parameter does not exist it is `undefined`.\n\n### Reproduction\n\nhttps://vueuse.org/core/useUrlSearchParams/?foo=bar&vueuse=awesome#type-declarations\n\n### System Info\n\n```Shell\nSystem:\r\n OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)\r\n CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz\r\n Memory: 16.24 GB / 31.02 GB\r\n Container: Yes\r\n Shell: 5.9 - /usr/bin/zsh\r\n Binaries:\r\n Node: 22.11.0 - ~/.local/share/mise/installs/node/22.11.0/bin/node\r\n npm: 10.9.0 - ~/.local/share/mise/installs/node/22.11.0/bin/npm\r\n pnpm: 9.11.0 - ~/.local/share/pnpm/pnpm\r\n Browsers:\r\n Chromium: 131.0.6778.85\r\n npmPackages:\r\n @vueuse/core: ^12.0.0 => 12.0.0 \r\n vue: ^3.4.18 => 3.5.13\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.",[],4388,"BUG | `functionName` | Type for `UrlParams` is incorrect","2024-12-22T15:31:30Z","https://github.com/vueuse/vueuse/issues/4388",0.7323037,{"description":2991,"labels":2992,"number":2993,"owner":2925,"repository":2925,"state":2935,"title":2994,"updated_at":2995,"url":2996,"score":2997},"### Describe the bug\n\nClicking in top menu \"Function\" between positions change hash but not content of page\r\n\r\nScreen on where issue is triggered:\r\n\u003Cimg width=\"1056\" alt=\"Zrzut ekranu 2022-04-21 o 20 48 46\" src=\"https://user-images.githubusercontent.com/2671726/164532273-60cbdea0-b123-4dfd-b14a-faf94598d94d.png\">\r\n\r\nConsole output:\r\n\u003Cimg width=\"815\" alt=\"Zrzut ekranu 2022-04-21 o 20 43 41\" src=\"https://user-images.githubusercontent.com/2671726/164531704-30d9f407-a656-4897-81e2-da64cef1780a.png\">\r\n\r\n\n\n### Reproduction\n\nhttps://vueuse.org/functions.html\n\n### System Info\n\n```Shell\nActually website. Chrome. MacOS. Incognito and no extensions installed\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.",[],1514,"Documentation - menu don't switch page","2022-04-21T19:11:31Z","https://github.com/vueuse/vueuse/issues/1514",0.73404026,{"description":2999,"labels":3000,"number":3001,"owner":2925,"repository":2925,"state":2935,"title":3002,"updated_at":3003,"url":3004,"score":3005},"### Describe the bug\r\n\r\n我的项目需要使用 onClickOutside 捕获点击元素外部事件,同时忽略某个外部元素。当忽略的元素内部包含 el-checkbox 组件时。在 firefox 浏览器下点击 el-checkbox 组件同样会触发 onClickOutside 事件,其它浏览如 chrome、edge 则不会出现问题。\r\n示例代码如下:\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n无\r\n\r\n### System Info\r\n\r\n```Shell\r\nFirefox 129.0.2\r\n\"@vueuse/head\": \"^0.7.6\"\r\n\"vue\": \"^3.4.31\"\r\n\"element-plus\": \"^2.7.7\",\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\nnpm\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.",[],4178,"使用 onClickOutside 函数在 firefox 浏览器下 ignore 配置项包含 el-checkbox 导致忽略配置失效","2024-12-19T03:40:37Z","https://github.com/vueuse/vueuse/issues/4178",0.7396752,["Reactive",3007],{},["Set"],["ShallowReactive",3010],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fHdTxgX93uaMLGYtSpGo9ns8WYsBAzDFRcWix6TEs8Xk":-1},"/vueuse/vueuse/4197"]