使用 Nuxt 3 我正在尝试导航到位于 pages/my-custom-page/index.vue 中的新寻呼机。单击按钮后,网址会发生变化,但页面内容永远不会被更新。当我刷新 url 时,它会将我带到所需的页面。有什么问题吗?
我试过使用 navigateTo、$router.go 和其他选项,但没有成功。
generateNewPage() {
this.$nuxt.$router.push({
path: '/my-custom-page',
query: { selectedValues: this.selectedValues }
});
},
出于某种原因,我在尝试路由到任何地方时遇到此错误
chunk-3NMN3MUW.js?v=43929ae8:7946 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')
at remove (chunk-3NMN3MUW.js?v=43929ae8:7946:1)
at Object.remove (chunk-3NMN3MUW.js?v=43929ae8:6812:1)
at unmount (chunk-3NMN3MUW.js?v=43929ae8:6488:1)
at unmountChildren (chunk-3NMN3MUW.js?v=43929ae8:6584:1)
at unmount (chunk-3NMN3MUW.js?v=43929ae8:6491:1)
at unmountComponent (chunk-3NMN3MUW.js?v=43929ae8:6564:1)
at unmount (chunk-3NMN3MUW.js?v=43929ae8:6478:1)
at unmountChildren (chunk-3NMN3MUW.js?v=43929ae8:6584:1)
at unmount (chunk-3NMN3MUW.js?v=43929ae8:6493:1)
at unmountChildren (chunk-3NMN3MUW.js?v=43929ae8:6584:1)