localStorage用法
引用:https://www.cnblogs.com/st-leslie/p/5617130.html
const STORAGE_KEY = 'todos-vuejs';
export default{
fetch(){
return JSON.parse(window.localStorage.getItem(STORAGE_KEY) || '[]');
},
save(items){
window.localStorage.setItem(STORAGE_KEY,JSON.stringify(items));
}
}