` but didn't see the effect.\n\nThank you.\n\n### Additional context\n\n_No response_",[3189],{"name":3190,"color":3191},"enhancement","a2eeef",3101,"ui","[Feature request] animation on change for carousel","2025-01-25T13:14:24Z","https://github.com/nuxt/ui/issues/3101",0.748716,{"labels":3199,"number":3202,"owner":3165,"repository":3165,"state":3166,"title":3203,"updated_at":3204,"url":3205,"score":3206},[3200,3201],{"name":3174,"color":3175},{"name":3177,"color":3178},11874,"useMeta calls `onBeforeUnmount` outside of component instance","2023-01-19T15:53:16Z","https://github.com/nuxt/nuxt/issues/11874",0.749846,{"description":3208,"labels":3209,"number":3212,"owner":3165,"repository":3165,"state":3166,"title":3213,"updated_at":3214,"url":3215,"score":3216},"### Environment\r\n\r\nNuxt project info: 10:45:42\r\n\r\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v16.15.1\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.2\r\n- Package Manager: npm@8.11.0\r\n- Builder: vite\r\n- User Config: pages\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\n```javascript\r\n\u003Cscript setup>\r\n/**\r\n * 请求api接口\r\n * @returns {Promise\u003Cany>}\r\n */\r\nconst getData = async () => {\r\n const { data, pending, error, refresh } = await useFetch('/api/test', {\r\n onResponse({ request, response, options }) {\r\n // 处理响应数据\r\n // localStorage.setItem('token', response._data.token)\r\n console.log(\"响应成功数据:\", response);\r\n }\r\n })\r\n\r\n console.log(\"data:\", data);\r\n}\r\n\r\nonMounted(() => {\r\n getData()\r\n})\r\n\u003C/script>\r\n\r\n```\r\n\r\n### Describe the bug\r\n\r\n### 标题:在 Nuxt 3.0 中,useFetch 的 onResponse 在 onMounted 中无法被执行\r\n\r\n### 描述:\r\n\r\n在我使用 Nuxt 3.0 的 useFetch 功能时,我发现了一个问题。如果我在 onMounted 的生命周期钩子中调用 useFetch,onResponse 似乎无法获取结果,或者说 onResponse 方法没有被执行。然而,如果我直接在 setup 中调用 useFetch,onResponse 就会被执行。这是我的代码:\r\n\r\n```javascript\r\n\u003Cscript setup>\r\n/**\r\n * 请求api接口\r\n * @returns {Promise\u003Cany>}\r\n */\r\nconst getData = async () => {\r\n const { data, pending, error, refresh } = await useFetch('/api/test', {\r\n onResponse({ request, response, options }) {\r\n // 处理响应数据\r\n // localStorage.setItem('token', response._data.token)\r\n console.log(\"响应成功数据:\", response);\r\n }\r\n })\r\n\r\n console.log(\"data:\", data);\r\n}\r\n\r\nonMounted(() => {\r\n getData()\r\n})\r\n\u003C/script>\r\n```\r\n### 重现步骤:\r\n\r\n1. 创建一个新的 Nuxt 3.0 项目。\r\n2. 在 onMounted 的生命周期钩子中调用 useFetch。\r\n3. 观察控制台,无法看到 \"响应成功数据\" 的日志输出。\r\n\r\n**期望的行为:**\r\nonResponse 在 onMounted 中被正确执行,并在控制台输出 \"响应成功数据\"。\r\n\r\n**实际的行为:**\r\nonResponse 在 onMounted 中没有被执行。\r\n\r\n**环境信息:**\r\nNuxt.js 版本:3.0\r\n浏览器版本:Firefox 116.0.3 (64 位)\r\n操作系统:Windows 11\r\nNode.js 版本:16.15.1\r\n\r\n**附加信息:**\r\n我尝试在 setup 中直接调用 useFetch,这时 onResponse 可以被正确执行。\r\n\r\n\r\n\r\n*****\r\n\r\n\r\n\r\n\r\n### Title: In Nuxt 3.0, useFetch's onResponse is not executed in onMounted\r\n\r\n### Description:\r\n\r\nWhile using the useFetch feature in Nuxt 3.0, I encountered a problem. If I call useFetch in the onMounted lifecycle hook, onResponse seems unable to obtain a result, or in other words, the onResponse method is not executed. However, if I call useFetch directly in setup, onResponse is executed. Here is my code:\r\n\r\n```javascript\r\n\u003Cscript setup>\r\n/**\r\n * Request API interface\r\n * @returns {Promise\u003Cany>}\r\n */\r\nconst getData = async () => {\r\n const { data, pending, error, refresh } = await useFetch('/api/test', {\r\n onResponse({ request, response, options }) {\r\n // Processing response data\r\n // localStorage.setItem('token', response._data.token)\r\n console.log(\"Successful response data:\", response);\r\n }\r\n })\r\n\r\n console.log(\"data:\", data);\r\n}\r\n\r\nonMounted(() => {\r\n getData()\r\n})\r\n\u003C/script>\r\n```\r\n### Steps to reproduce:\r\nCreate a new Nuxt 3.0 project.\r\nCall useFetch in the onMounted lifecycle hook.\r\nObserve the console, the \"Successful response data\" log output is not visible.\r\n\r\n### Expected behavior:\r\nonResponse is correctly executed in onMounted, and \"Successful response data\" is output to the console.\r\n\r\n### Actual behavior:\r\nonResponse is not executed in onMounted.\r\n\r\n### Environment Information:\r\nNuxt.js version: 3.0\r\nBrowser version: Firefox 116.0.3 (64-bit)\r\nOperating System: Windows 11\r\nNode.js version: 16.15.1\r\n\r\n### Additional Information:\r\nWhen I try to call useFetch directly in setup, onResponse is correctly executed.\r\n\r\n### Additional context\r\n\r\n完整代码如下(The complete code is as follows):\r\n``` vue\r\n\u003C!-- index.vue -->\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch1>欢迎来到我的首页\u003C/h1>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\n/**\r\n * 请求api接口\r\n * @returns {Promise\u003Cany>}\r\n */\r\nconst getData = async () => {\r\n const { data, pending, error, refresh } = await useFetch('/api/test', {\r\n onResponse({ request, response, options }) {\r\n // 处理响应数据\r\n // localStorage.setItem('token', response._data.token)\r\n console.log(\"响应成功数据:\", response);\r\n }\r\n })\r\n\r\n console.log(\"data:\", data);\r\n}\r\n\r\nonMounted(() => {\r\n getData()\r\n})\r\n\r\n\r\n\u003C/script>\r\n\r\n\u003Cstyle scoped>\u003C/style> \r\n``` \r\n\r\n\r\n### Logs\r\n\r\n_No response_",[3210,3211],{"name":3174,"color":3175},{"name":3159,"color":3160},22688,"在 Nuxt 3.0 中,useFetch 的 onResponse 在 onMounted 中无法被执行","2023-12-29T08:03:51Z","https://github.com/nuxt/nuxt/issues/22688",0.7527339,{"description":3218,"labels":3219,"number":3222,"owner":3165,"repository":3223,"state":3166,"title":3224,"updated_at":3225,"url":3226,"score":3227},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.15.4\n- CLI Version: 3.22.4\n- Nitro Version: 2.11.3\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: devtools, compatibilityDate\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-4czkz34t?file=components%2FMyComponent.vue,test%2FMyComponent.test.js\n\n### Describe the bug\n\nAfter using `setProps` in a component mounted with `mountSuspended`, using `$emit` inside a method will emit the event twice, which can be checked with `wrapper.emitted()`. This behaviour does not exist when using `mount()`. Please see reproduction link.\n\nA workaround is to use the `$emit` directly in the `@click` attribute, like this:\n\n```\n\u003Cbutton @click=\"$emit('test', 'a')\">test\u003C/button>\n```\n\nBut this is not sufficient if a method needs to be called that does other things as well besides emitting.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3220],{"name":3159,"color":3221},"5D08F5",1176,"test-utils","Component mounted with mountSuspended emits events twice after setProps was called","2025-06-17T09:02:32Z","https://github.com/nuxt/test-utils/issues/1176",0.75303364,{"description":3229,"labels":3230,"number":3234,"owner":3165,"repository":3165,"state":3166,"title":3235,"updated_at":3236,"url":3237,"score":3238},"\r\nThe `method` and `mounted` in the `component` under **window7 IE9**, sometimes does not execute。Not every time. When the console is opened, it is executed correctly.\r\n\r\n\r\n\r\ndemo: [https://www.jumorexfp.com/](https://www.jumorexfp.com/)\r\n\r\n\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2108\">#c2108\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3231],{"name":3232,"color":3233},"2.x","d4c5f9",2430,"components mounted no work in window7 IE9 ","2023-01-18T15:55:12Z","https://github.com/nuxt/nuxt/issues/2430",0.7531242,{"description":3240,"labels":3241,"number":3234,"owner":3165,"repository":3193,"state":3166,"title":3249,"updated_at":3250,"url":3251,"score":3238},"### Environment\n\n- Operating System: Linux\n- Node Version: v20.17.0\n- Nuxt Version: 3.13.2\n- CLI Version: 3.14.0\n- Nitro Version: 2.9.7\n- Package Manager: npm@10.8.2\n- Builder: -\n- User Config: -\n- Runtime Modules: -\n- Build Modules: -\n\n### Version\n\nv3.0.0-alpha.6\n\n### Reproduction\n\nAdd UInputMenu or USelectMenu inside a USlideover\n\n### Description\n\nThe z-index value of the Slideover is bigger than the one on the portal created by UInputMenu/USelectMenu, making the options being hidden behind it and not selectable.\n\nFor now i just added:\n\n`div[data-radix-popper-content-wrapper] {\n z-index: 999 !important;\n}`\n\non `app.vue` to quick fix the problem or add `:portal=\"false\"` as a property of UInputMenu/USelectMenu.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3242,3243,3246],{"name":3177,"color":3178},{"name":3244,"color":3245},"duplicate","cfd3d7",{"name":3247,"color":3248},"v3","49DCB8","UInputMenu/USelectMenu not working with USlideover due to z-index","2024-10-21T10:16:16Z","https://github.com/nuxt/ui/issues/2430",{"description":3253,"labels":3254,"number":3256,"owner":3165,"repository":3165,"state":3166,"title":3257,"updated_at":3258,"url":3259,"score":3260},"Although it can be used, there are warnings. Why? Can't I keep using useFetch?\r\n\r\n\r\n\r\n\r\n```\r\nimport type {UseFetchOptions} from \"#app\";\r\nimport type {Ref} from \"vue\";\r\nimport type {SearchParameters} from \"ofetch\";\r\n\r\nconst request = async \u003CT = any>(url: any, options: any) => {\r\n const config = useRuntimeConfig();\r\n //设置url\r\n options.baseURL=config.public.apiBase\r\n let token = useCookie(\"manageToken\")\r\n let customHeaders: { \"Content-Type\": string, Authorization?: string } = {\"Content-Type\": \"application/json\"}\r\n const res=await useFetch\u003CT>(url, {headers: customHeaders,...options})\r\n if(process.client){\r\n if(res.error&&res.error.value){\r\n ElNotification({\r\n title: '系统错误提示',\r\n message: res.error.value.message,\r\n type: 'error',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n else if (res.data.value&&(res.data.value as any).Msg) {\r\n if((res.data.value as any).Code===0){\r\n ElNotification({\r\n title: '系统提示',\r\n message: (res.data.value as any).Msg,\r\n type: 'success',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n else{\r\n ElNotification({\r\n title: '错误提示',\r\n message: (res.data.value as any).Msg,\r\n type: 'error',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n }\r\n }\r\n\r\n return res\r\n};\r\ntype ResponseType\u003CT = any> = T extends undefined ? CommonResponse\u003Cany> : CommonResponse\u003CT>;\r\n\r\nexport const http = {\r\n get: \u003CT = any>(url: Ref\u003Cstring>|string, query?: SearchParameters, opts?: UseFetchOptions\u003CT>) => {\r\n return request\u003CT>(url, {...opts,...{method: 'GET', query}});\r\n },\r\n post: \u003CT = undefined>(url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CT>>) => {\r\n return request\u003CResponseType\u003CT>>(url, {...opts,...{method: 'POST', body}});\r\n },\r\n put: \u003CT = undefined>(url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CT>>) => {\r\n return request\u003CResponseType\u003CT>>(url, {...opts,...{method: 'PUT', body}});\r\n },\r\n postGetList: (url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CCommonResponseGetList>>) => {\r\n return request\u003CCommonResponseGetList>(url, {...opts,...{method: 'POST', body}});\r\n },\r\n}\r\n\r\n```",[3255],{"name":3162,"color":3163},27242,"[useFetch] Component is already mounted, please use $fetch instead. See https://nuxt.com/docs/getting-started/data-fetching","2024-06-27T14:10:07Z","https://github.com/nuxt/nuxt/issues/27242",0.75472236,{"description":3262,"labels":3263,"number":3266,"owner":3165,"repository":3165,"state":3166,"title":3267,"updated_at":3268,"url":3269,"score":3270},"### Environment\n\n- Operating System: `Linux`\r\n- Node Version: `v16.17.1`\r\n- Nuxt Version: `3.2.2`\r\n- Nitro Version: `2.2.2`\r\n- Package Manager: `npm@8.15.0`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`, `modules`, `css`, `app`, `experimental`, `imports`, `nitro`, `typescript`\r\n- Runtime Modules: `@pinia/nuxt@0.4.7`, `@nuxtjs/tailwindcss@6.4.1`\r\n- Build Modules: \n\n### Reproduction\n\n\r\n```\r\n// before refresh call asyncData a pending must be false\r\nconst { pending: isLoadingOne, refresh: fetchOne } = useFetch('https://jsonplaceholder.typicode.com/todos/1', { immediate: false });\r\n\r\n// before refresh call asyncData a pending must be false | perhaps a controversial case\r\nconst { pending: isLoadingTwo, refresh: fetchTwo } = await useFetch('https://jsonplaceholder.typicode.com/todos/2', { immediate: false });\r\n```\r\n\r\nSee full code: https://stackblitz.com/edit/nuxt-starter-9uxzmd?file=app.vue\n\n### Describe the bug\n\nUntil the request is forcibly invoked, it is assumed that the waiting status should be false.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3264,3265],{"name":3174,"color":3175},{"name":3159,"color":3160},19218,"`useFetch/useAsyncData`: BUG: when `immediate: false`, then `pending` is `true` before call `execute/refresh` (must to be false)","2023-12-20T16:49:10Z","https://github.com/nuxt/nuxt/issues/19218",0.755164,["Reactive",3272],{},["Set"],["ShallowReactive",3275],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fp6hVLw3N-dngyKTSwoFMJn9stm0cI_s8iPid_tarPmU":-1},"/nuxt/nuxt.com/855"]