Socket
Socket
Sign inDemoInstall

vue-router-iframe

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-router-iframe

Modify for the iframe tab, Solved the problem of iframe sharing browser history.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

相关资料:

  • https://github.com/vuejs/vue-router/issues/729
  • https://www.cnblogs.com/NaN-prototype/p/14308503.html

Keywords

FAQs

Last updated on 20 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc