0.0.1 • Published 1 year ago

vue-router-iframe v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue-router-iframe

fork form vue-router-3.6.5

iframe 存在共享 history 的问题,为了解决该问题,基于 abstract 模式使用内存管理 iframe 内部的历史记录

  • 新增abstact-history模式

    基于 abstact 修改,使其支持 url 路由初始化

export class AbstractHTML5History extends AbstractHistory {
  index: number
  stack: Array<Route>
  getCurrentLocation(): string {
    if (this.stack.length === 0) {
      return getLocation(this.base)
    } else {
      const current = this.stack[this.stack.length - 1]
      return current ? current.fullPath : '/'
    }
  }
}

相关资料:

0.0.1

1 year ago