Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对于本地存储相关的建议 #75

Open
lopo12123 opened this issue Aug 11, 2022 · 0 comments
Open

对于本地存储相关的建议 #75

lopo12123 opened this issue Aug 11, 2022 · 0 comments

Comments

@lopo12123
Copy link

lopo12123 commented Aug 11, 2022

初步使用了一下, 发现您目前似乎是使用localstorage来做本地存储的, 我建议改用indexedDB来存储.

理由如下:

  1. 本地存储localStorage大小一般就只有5M, 万一用户长期使用或者项目日后扩展,存储需求增加导致空间不够再重构会变得很麻烦. idb 大小一般没什么限制, 可以自己申请足够使用了
  2. local的存储就是键值对, 用户f12双击就可以随便更改; idb使用更偏向数据库类似的使用, 而且用户只能查看删除但一般是无法修改的.

如果您可以接受这个改动提议的话我可以搞个pr来做这块相关的工作😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant