1.0.6 • Published 1 year ago
@beige/quick-vue-history v1.0.6
Quick vue history
介绍
快速切换vue-router的历史记录,采用LRU + Indexdb存储方案
1. 安装
npm install @beige/quick-vue-history --save
2. 引入
import router from '@/you-vue-router' // 你的vue-router配置
import { createQuickHistory } from '@beige/quick-vue-history'
import '@beige/quick-vue-history/dist/quick-vue-history.css'
createQuickHistory(router, options)
3. options配置
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
storeName | String | 'QUICK_VUE_HISTORY' | 存储的键名 |
exclude | Array | [] | 需要过滤的路由path列表,如:'/login' |
maxLength | Number | 10 | 历史缓存最大长度, 0表示无限制 |
compressLimit | Number | 3.5 | 压缩图片文件大于此值时压缩 |
compressRate | Number | 0.7 | 压缩率 |
4. 使用
Mac 通过快捷键
Command + k
显示历史记录windows 通过快捷键
win + k
显示历史记录