\r\n\u003C!-- ... -->\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\" setup>\r\n\r\nconst page = ref\u003Cnumber>(1)\r\n\r\n// temporary name \"promise\" -- maybe this could replace the \"pending\" boolean in Nuxt 4?\r\nconst { data, promise } = useFetch('/api/my-items', {\r\n query: {\r\n page: page\r\n }\r\n})\r\n\r\nasync function handleFetchMore() {\r\n page.value += 1\r\n // would this work? or would nextTick() need to be awaited before it?\r\n await promise.value\r\n}\r\n\r\n// ...\r\n\r\n\u003C/script>\r\n```\r\n\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[1995,1998],{"name":1996,"color":1997},"enhancement","8DEF37",{"name":1999,"color":2000},"discussion","538de2",26678,"Return the current promise from `useFetch` in a computed ref","2024-06-30T11:04:44Z","https://github.com/nuxt/nuxt/issues/26678",0.7679994,{"description":2007,"labels":2008,"number":2015,"owner":1985,"repository":1985,"state":2016,"title":2017,"updated_at":2018,"url":2019,"score":2020},"### Environment\r\n\r\nrc-13\r\nnode 18\r\n\r\n### Reproduction\r\n\r\ni have paginate component...\r\n```javascript\r\n\u003Cpaginate v-model=\"page\" :page-range=\"limit\" :page-count=\"pages\" :click-handler=\"getAllItems\" prev-text=\"Prev\" next-text=\"Next\" container-class=\"pagination\" page-class=\"page-item\"> \u003C/paginate>\r\n```\r\n\r\n```javascript\r\nasync function getAllItems() {\r\n let response = await myfetch('/store/storeCourses', {\r\n method: 'GET',\r\n query:{\r\n page:page.value ,\r\n storeCourseGroup:storeCourseGroup.value,\r\n limit:limit.value\r\n }\r\n });\r\n \r\n if (response.data)\r\n list.value = response.data.docs;\r\n pages.value = response.data.pages;\r\n}\r\nconst myfetch = async (url,options,emits) => { \r\n\r\n const { data, pending, error, refresh } = await useFetch(url, {\r\n key : hash(['api-fetch', url, options]),\r\n baseURL: useRuntimeConfig().API_URL, \r\n initialCache: false,\r\n headers: new Headers({ 'authorization': (process.client)?localStorage.getItem(\"token\"):''}),\r\n ...options,\r\n onResponse ({ response }) {\r\n return response._data\r\n },\r\n onResponseError ({ response }) {\r\n return response._data\r\n }\r\n });\r\n const resData = data.value;\r\n return resData;\r\n \r\n }\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n### Describe the bug\r\n\r\non page load it shows { 2 } instead of { Next }\r\n\r\n\r\nbut if i go to other page and come back to home site, it shows correctly\r\n\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2009,2012],{"name":2010,"color":2011},"3.x","29bc7f",{"name":2013,"color":2014},"pending triage","E99695",15473,"closed","useFetch amazing behavior, change innerText","2023-01-19T17:51:25Z","https://github.com/nuxt/nuxt/issues/15473",0.73241746,{"labels":2022,"number":2028,"owner":1985,"repository":1985,"state":2016,"title":2029,"updated_at":2030,"url":2031,"score":2032},[2023,2024,2025],{"name":2010,"color":2011},{"name":2013,"color":2014},{"name":2026,"color":2027},"needs reproduction","FBCA04",14462,"useLazyFetch with useRoute query not work","2023-01-19T17:35:48Z","https://github.com/nuxt/nuxt/issues/14462",0.7395081,{"description":2034,"labels":2035,"number":2039,"owner":1985,"repository":2040,"state":2016,"title":2041,"updated_at":2042,"url":2043,"score":2044},"### Environment\n\nx\n\n### Version\n\nx\n\n### Reproduction\n\nx\n\n### Description\n\nWhen navigating to the Nuxt UI v2 homepage from another page within the app, it does not display and throws an error. However, if the page is reloaded directly, it loads correctly.\n\n#### Console error:\nA JavaScript error related to .map appears in the console.\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2036],{"name":2037,"color":2038},"bug","d73a4a",3541,"ui","docs: v2 homepage does not display when navigating internally","2025-03-18T14:27:58Z","https://github.com/nuxt/ui/issues/3541",0.74348,{"description":2046,"labels":2047,"number":2048,"owner":1985,"repository":2049,"state":2016,"title":2050,"updated_at":2051,"url":2052,"score":2053},"https://app.vuejobs.com/feed/nuxtjs/docs?limit=-1&format=json&filter[search]=nuxt",[],1024,"nuxt.com","[Jobs] Use new endpoint","2023-06-06T12:14:24Z","https://github.com/nuxt/nuxt.com/issues/1024",0.7489238,{"description":2055,"labels":2056,"number":2063,"owner":1985,"repository":1985,"state":2016,"title":2064,"updated_at":2065,"url":2066,"score":2067},"Is this already implemented, if so, how do I get them into the fetch operation? Would be useful for pagination/filtering data for when somebody bookmarks and shares a page.\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/c142\">#c142\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2057,2060],{"name":2058,"color":2059},"question","cc317c",{"name":2061,"color":2062},"2.x","d4c5f9",167,"Question: What about URL query params?","2023-01-18T15:38:32Z","https://github.com/nuxt/nuxt/issues/167",0.7574893,{"description":2069,"labels":2070,"number":2073,"owner":1985,"repository":1985,"state":2016,"title":2074,"updated_at":2075,"url":2076,"score":2077},"### Environment\n\nrc-13\r\nnode-18\n\n### Reproduction\n\n//composable\r\n```javascript\r\nconst myfetch = async (url,options,emits) => {\r\n const { data, pending, error, refresh } = await useFetch(url, {\r\n \r\n ...options,\r\n baseURL: useRuntimeConfig().API_URL, \r\n initialCache: false,\r\n headers: new Headers({ 'authorization': (process.client)?localStorage.getItem(\"token\"):''}),\r\n onResponse ({ response }) {\r\n return response._data\r\n },\r\n onResponseError ({ response }) {\r\n return response._data\r\n }\r\n })\r\n const resData = data.value\r\n \r\n return resData\r\n }\r\n```\r\n//component 1\r\n\r\n```javascript\r\n\u003Cscript setup>\r\ngetAllItems();\r\nasync function getAllItems() {\r\n let response = await myfetch('/article/artPosts?' +\r\n 'page=' + page.value + '&' +\r\n 'artPostGroup=' + artPostGroup.value + '&' +\r\n 'limit=' + limit.value, {\r\n method: 'GET'\r\n });\r\n if (response.data)\r\n list.value = response.data.docs;\r\n pages.value = response.data.pages;\r\n}\r\n\u003C/script>\r\n```\r\n\r\n//component 2\r\n\r\n```javascript\r\n\u003Cscript setup>\r\ngetAllItems();\r\nasync function getAllItems() {\r\n let response = await myfetch('/store/storeCourses?' +\r\n 'page=' + page.value + '&' +\r\n 'storeCourseGroup=' + storeCourseGroup.value + '&' +\r\n 'limit=' + limit.value, {\r\n method: 'GET'\r\n });\r\n if (response.data)\r\n list.value = response.data.docs;\r\n pages.value = response.data.pages;\r\n}\r\n\u003C/script>\r\n```\r\n//home.vue\r\n```javascript\r\n\u003Cdiv>\r\n\u003Ccomponent1>\u003C/component1>\r\n\u003Ccomponent2>\u003C/component2>\r\n\u003C/div>\r\n```\n\n### Describe the bug\n\nthe bug is here...\r\nin the page load:\r\nresponse of component1 is the same as response of component2...\r\n\r\n\r\nwhen i use $fetch instead of useFetch, it works good but it makes another problem for me...\r\n\r\non refreshing page,it send a request twice to server\r\n\n\n### Additional context\n\nhow can i write function in composables?\n\n### Logs\n\n_No response_",[2071,2072],{"name":2010,"color":2011},{"name":2013,"color":2014},15451,"UseFetch() calling multiple request, only the last data is fetched and $fetch send requests twice","2023-01-19T17:50:37Z","https://github.com/nuxt/nuxt/issues/15451",0.7581646,{"description":2079,"labels":2080,"number":2083,"owner":1985,"repository":1985,"state":2016,"title":2084,"updated_at":2085,"url":2086,"score":2087},"### Environment\r\n\r\nnuxt3 useFetch方式使用post请求 调用后端api ,进行分页时候 \r\n```\r\nconst pageNum = ref(1);\r\nconst {data : posts,refresh,pending} = useFetch('https://xxxx.com/xxx', {\r\n method: 'post',\r\n body: {\r\n pageNum: pageNum.value,\r\n pageSize: 10,\r\n }\r\n});\r\n\r\nfunction next() {\r\n pageNum .value += 1;\r\n refresh()\r\n}\r\n\r\nfunction prev() {\r\n pageNum .value -= 1;\r\n refresh()\r\n}\r\n```\r\n点击next() 或者 prev() ,重新 refresh()刷新请求api 带的参数 pageNum.value 还是等于1 没有动态改变,这个问题怎么回事。但是我发现如果使用get请求 参数可以被动态改变\r\n\r\n### Reproduction\r\n\r\nnuxt3 useFetch方式使用post请求 调用后端api ,进行分页时候 \r\n```\r\nconst pageNum = ref(1);\r\nconst {data : posts,refresh,pending} = useFetch('https://xxxx.com/xxx', {\r\n method: 'post',\r\n body: {\r\n pageNum: pageNum.value,\r\n pageSize: 10,\r\n }\r\n});\r\n\r\nfunction next() {\r\n pageNum .value += 1;\r\n refresh()\r\n}\r\n\r\nfunction prev() {\r\n pageNum .value -= 1;\r\n refresh()\r\n}\r\n```\r\n点击next() 或者 prev() ,重新 refresh()刷新请求api 带的参数 pageNum.value 还是等于1 没有动态改变,这个问题怎么回事。但是我发现如果使用get请求 参数可以被动态改变\r\n\r\n### Describe the bug\r\n\r\nnuxt3 useFetch方式使用post请求 调用后端api ,进行分页时候 \r\n```\r\nconst pageNum = ref(1);\r\nconst {data : posts,refresh,pending} = useFetch('https://xxxx.com/xxx', {\r\n method: 'post',\r\n body: {\r\n pageNum: pageNum.value,\r\n pageSize: 10,\r\n }\r\n});\r\n\r\nfunction next() {\r\n pageNum .value += 1;\r\n refresh()\r\n}\r\n\r\nfunction prev() {\r\n pageNum .value -= 1;\r\n refresh()\r\n}\r\n```\r\n点击next() 或者 prev() ,重新 refresh()刷新请求api 带的参数 pageNum.value 还是等于1 没有动态改变,这个问题怎么回事。但是我发现如果使用get请求 参数可以被动态改变\r\n\r\n### Additional context\r\n\r\nnuxt3 useFetch方式使用post请求 调用后端api ,进行分页时候 \r\n```\r\nconst pageNum = ref(1);\r\nconst {data : posts,refresh,pending} = useFetch('https://xxxx.com/xxx', {\r\n method: 'post',\r\n body: {\r\n pageNum: pageNum.value,\r\n pageSize: 10,\r\n }\r\n});\r\n\r\nfunction next() {\r\n pageNum .value += 1;\r\n refresh()\r\n}\r\n\r\nfunction prev() {\r\n pageNum .value -= 1;\r\n refresh()\r\n}\r\n```\r\n点击next() 或者 prev() ,重新 refresh()刷新请求api 带的参数 pageNum.value 还是等于1 没有动态改变,这个问题怎么回事。但是我发现如果使用get请求 参数可以被动态改变\r\n\r\n### Logs\r\n\r\n```shell-script\r\nnuxt3 useFetch方式使用post请求 调用后端api ,进行分页时候 \r\n\r\nconst pageNum = ref(1);\r\nconst {data : posts,refresh,pending} = useFetch('https://xxxx.com/xxx', {\r\n method: 'post',\r\n body: {\r\n pageNum: pageNum.value,\r\n pageSize: 10,\r\n }\r\n});\r\n\r\nfunction next() {\r\n pageNum .value += 1;\r\n refresh()\r\n}\r\n\r\nfunction prev() {\r\n pageNum .value -= 1;\r\n refresh()\r\n}\r\n```\r\n点击next() 或者 prev() ,重新 refresh()刷新请求api 带的参数 pageNum.value 还是等于1 没有动态改变,这个问题怎么回事。但是我发现如果使用get请求 参数可以被动态改变\r\n```\r\n",[2081,2082],{"name":2010,"color":2011},{"name":2013,"color":2014},25367,"nuxt3 useFetch 进行分页请求 调用后端接口 使用post方式问题","2024-09-11T20:24:53Z","https://github.com/nuxt/nuxt/issues/25367",0.7613698,{"description":2089,"labels":2090,"number":2093,"owner":1985,"repository":1985,"state":2016,"title":2094,"updated_at":2095,"url":2096,"score":2097},"### Describe the feature\r\n\r\nI need to make a drop-down paging. How can I still render normally after overlaying data?\r\n```\r\nconst body = computed(() => ({\r\n pageSize: 10,\r\n pageNum: pageNum.value\r\n}))\r\nconst {refresh,data} = await useFetch('https://xxx.com/t',{\r\n watch: [pageNum],\r\n method: 'POST',\r\n body\r\n})\r\n\r\nconst loadMore = () => {\r\n pageNum.value++;\r\n refresh();\r\n};\r\n\r\n\r\n \u003Carticle>\r\n \u003Cul class=\"wrz_blog-article-list\">\r\n \u003Carticle-list :article-data=\"data.data\"/>\r\n \u003C/ul>\r\n \u003Cbutton @click=\"loadMore\">{{!isMore ? \"加载更多\" : \"没有更多了~\"}}\u003C/button>\r\n \u003C/article>\r\n\r\n```\r\n\r\n\r\n### Additional information\r\n\r\n- [ ] Would you be willing to help implement this feature?\r\n- [ ] Could this feature be implemented as a module?\r\n\r\n### Final checks\r\n\r\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\r\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2091,2092],{"name":2010,"color":2011},{"name":2013,"color":2014},25374,"nuxt3 如何分页时候如何进行数据追加","2024-01-22T12:55:20Z","https://github.com/nuxt/nuxt/issues/25374",0.7616359,["Reactive",2099],{},["Set"],["ShallowReactive",2102],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"al7zl0PDoCceOuKRlc58FyUGdLNHW3w-uVNIcrxhRrs":-1},"/nuxt/test-utils/1080"]