# vue-router-iframe

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

Latest version **0.0.1** (published 2023-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-router-iframe
pnpm add vue-router-iframe
yarn add vue-router-iframe
bun add vue-router-iframe
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-02-20 |
| First published | 2023-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 590.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mewcoder |
| Maintainers | mewcoder |
| Keywords | vue, router, routing |

## Links

- npm: https://www.npmjs.com/package/vue-router-iframe
- Repository: https://github.com/mewcoder/vue-router-iframe
- Homepage: https://github.com/mewcoder/vue-router-iframe#readme
- Issues: https://github.com/mewcoder/vue-router-iframe/issues
- npm.io page: https://npm.io/package/vue-router-iframe

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2023-02-20

## README

# vue-router-iframe

> fork form vue-router-3.6.5

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

- 新增`abstact-history`模式
  > 基于 `abstact` 修改，使其支持 url 路由初始化

```js
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

---
_Source: https://npm.io/package/vue-router-iframe · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
