在 Next.js 中取消页面导航,就像 Nuxt 的 Navigation Guard 功能一样。
Cancel page navigation in Next.js, like Nuxt's Navigation Guard feature.