Skip to content
导航

back、forward

TIP

back,回退一个历史记录,相当于go(-1)

forward,前进一个历史记录,相当于go(1)

backforward都是通过go实现。关于go的实现可参考:go

ts
const router = {
  // ...
  back: () => go(-1),
  forward: () => go(1),
  // ...
}
back、forward has loaded