1348571886@qq.com
1348571886@qq.com
  • 发布:2019-11-08 21:12
  • 更新:2019-11-08 22:42
  • 阅读:19

localStorage.getItem 返回undefined的问题

分类:uni-app

bug如下:

localStorage.setItem('teststr','123123');  

localStorage.getItem('teststr'); // 123123  

localStorage.setItem('testobj',JSON.stringify({a:"123"}));  

localStorage.getItem('testobj'); // undefined   
2019-11-08 21:12 分享
已邀请:
DCloud_UNI_陈晨

DCloud_UNI_陈晨 - DCloud前端开发工程师

localStorage.setItem('testobj',JSON.stringify({'a':"123"}))

要回复问题请先登录注册