📅  最后修改于: 2022-03-11 15:03:21.683000             🧑  作者: Mango
try {
localStorage.setItem(key, value);
} catch(e) {
if (e.code == 22) {
// Storage full, maybe notify user or do some clean-up
}
}