vue-router-iframe
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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 : '/'
    }
  }
}

相关资料:

Readme

Keywords

Package Sidebar

Install

npm i vue-router-iframe

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

605 kB

Total Files

52

Last publish

Collaborators

  • mewcoder