1.0.2 • Published 4 years ago

all-keep-alive v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

all-keep-alive

Features

一个升级版的keep-alive,可以用来缓存所有的页面,包括复用页面。 可以在实现一些多标签页面,打开标签需要缓存页面数据的场景下使用

install

npm install all-keep-alive

使用

import { allKeepAlive } from 'all-keep-alive'
export default {
  components: { allKeepAlive }
}
// 复用页面跳转的时候,路由不会跳转,所以需要在路由组件上添加一个key
// 需要把组件的路由地址传入到include数组中
// 例:localhost:8080/home/page3/3
// 需要把/home/page3/3作为参数push进include数组
<all-keep-alive :include="includePageNames">
  <router-view :key="$route.fullPath" />
</all-keep-alive>

github 欢迎大家star,提供issues。

License

LicenseFinder is released under the MIT License.

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago