我希望能够管理我SvelteKit应用程序的历史记录,同时确保整个SvelteKit路由系统不受任何影响。类似于:
function routeToPage(route: string) {
router.push(`/${route}`) // equivalent of this function
}
reflength
变量从哪里来? - laszlogoBack()
? - monstoreflength
is missing the dot operator:ref.length
- edfonsecastate
可以用于修改历史记录:goto(\
/${route}`, {state: `/${route}`});`如果您想要覆盖当前的历史记录条目,请使用replaceState:true
。 - Malo Marrec