idb-js icon indicating copy to clipboard operation
idb-js copied to clipboard

对indexdb本地数据库的封装

Results 6 idb-js issues
Sort by recently updated
recently updated
newest added

简单场景:调用登录接口,将token存入indexDB,存储成功后,在封装的idb的success回调中是否能支持$router跳转,之前我使用过为封装的indexDB,在类似场景中,存储成功后不能跳转业务场景。

在本地测试了下10000条数据查询耗时8-9s左右。 而通过indexedDB的store.getAll(),拿出数据后在内存里for循环判断条件。耗时1s左右 demo代码如下: ![image](https://user-images.githubusercontent.com/17918845/98914117-3b99d900-2503-11eb-8cba-3d731f505d44.png) 遍历游标的方式应该是不可取的。

/** * @method 删除数据 * @param {Object} * @property {String} tableName 表名 * @property {Function} condition 查询的条件,遍历,与filter类似 * @arg {Object} 每个元素 * @return 条件 * @property {Function} [success] 删除成功的回调 @return...