初始化仓库
This commit is contained in:
6
src/utils/localStorage.js
Normal file
6
src/utils/localStorage.js
Normal file
@ -0,0 +1,6 @@
|
||||
function setStorage(item, value) {
|
||||
return localStorage.setItem(item, JSON.stringify(value));
|
||||
}
|
||||
function getStorage(item) {
|
||||
return JSON.parse(localStorage.getItem(item));
|
||||
}
|
||||
Reference in New Issue
Block a user