66
77---
88
9- 😄 可以为多个库提供持久化服务 (vuex, pinia) <br /> 🔧 支持 TypeScript <br /> 📦 支持 LocalStorage <br /> 🔒 支持相对安全的存储环境(非明文) <br /> 😊 自由的安装方
10- 式 <br /> 🙅♂️ 灵活的配置且没有副作用 <br /> 📄 对开发友好的状态变更 Log <br /> 💪 持久化加强功能 (过期时间,重命名...)<br />
9+ - 😄 可以为多个库提供持久化服务 (vuex, pinia)
10+ - 🔧 支持 TypeScript
11+ - 📦 支持 LocalStorage
12+ - 🔒 支持相对安全的存储环境(非明文)
13+ - 😊 自由的安装方式
14+ - 🙅♂️ 灵活的配置且没有副作用
15+ - 📄 对开发友好的状态变更 Log
16+ - 💪 持久化加强功能 (过期时间,重命名...)
1117
1218## 安装
1319
@@ -26,6 +32,17 @@ import { plugins, config, crypto } from 'store-persistedstate-killer'
2632createApp (App ).use (createPinia ().use (plugins .pinia .init ).use (plugins .pinia .use )).mount (' #app' )
2733```
2834
35+ ## Demo
36+
37+ <iframe src="https://codesandbox.io/embed/objective-sun-1wmt7?fontsize=14&hidenavigation=1&theme=dark"
38+ style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
39+ title="objective-sun-1wmt7"
40+ allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
41+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
42+ > </iframe >
43+
44+ > 建议从新的浏览器标签页打开 demo,以便更好的体验功能
45+
2946## 目标
3047
31481 . 用状态管理接管你的 storage,从此无需担心类型,像操作 store 一样操作 storage 即可
@@ -64,8 +81,8 @@ use 是 killer 的核心功能,它可以监听 state 的变更以及 patch 操
6481
6582| Platform | Finish | Doc |
6683| -------- | ------ | --- |
67- | pinia2 | 🚧 | 🚧 |
68- | vuex4/5 | 🙅 | 🙅 |
84+ | pinia2 | ✅ | 🚧 |
85+ | vuex4/5 | 🚧 | 🚧 |
6986
7087## 核心
7188
@@ -172,7 +189,7 @@ const _crypto = new crypto({
172189
173190[ 查看加密模块的类型声明] ( https://github.com/1018715564/store-persistedstate-killer/blob/master/typings/crypto.d.ts )
174191
175- | Api | Desc | Type |
176- | ------- | ---- | -------------------------- |
192+ | Api | Desc | Type |
193+ | ------- | ---- | ----------------------------------- |
177194| encrypt | 加密 | ` (data: string) => string \| null ` |
178195| decrypt | 解密 | ` (data: string) => string \| null ` |
0 commit comments