yux-storage
yux-storage copied to clipboard
yux-storage 是一个基于 HTML5 IndexedDB 封装的 Web 本地数据离线存储库
![image](https://user-images.githubusercontent.com/26277752/176120869-56fe14ea-7045-4e76-afdf-c35299b9a5c8.png)
有重构 TS 的打算吗
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) Welcome to [Renovate](https://togithub.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request....
问题例子: var data = '{"0": "零零零","1": "一一一","2": "二二二","3": "三三三"}'; var data = JSON.parse(data); yuxStorage.setItem('A', data).then(res => { console.log('设置成功'); }); 打乱顺序后: var data = '{"3": "三三三","1": "一一一","2": "二二二","0": "零零零"}'; var data...
用下面这个就监听所有了。 yuxStorage.addEventListener((type, data) => { console.log(type, data) }) 请问怎么监听指定一个key,有变化就输出对应的value呢?
需要用toRaw方法 或者 深拷贝来获取原始js数据才能进行存储。 报错信息如下: ![0](https://github.com/yued-fe/yux-storage/assets/73210964/759cd109-2693-4287-b212-c31c2be58408) ![1](https://github.com/yued-fe/yux-storage/assets/73210964/8642fa63-4dd4-4ace-8f64-d13d46feae19)