vue 使用 hx-storage 来进行本地存储
vue 使用 hx-storage 来进行本地存储
前端js使用localStorage的时候只能存字符串,不能存储对象
hx-storage 可以存储 object undefined number string
localStorage没有过期时间
hx-storage 可以设置以天为单位的过期时间
安装
npm i hx-storage
or
yarn add hx-storage
使用
import hxStorage from 'hx-storage';
// 设值
/
原创
2021-10-27 10:15:26 ·
208 阅读 ·
0 评论