common/LocalStorage.js | ●●●●● patch | view | raw | blame | history |
common/LocalStorage.js
@@ -59,6 +59,17 @@ return matches; } // 清除本地存储工具保存的所有数据 cleanAll(){ const info = Taro.getStorageInfoSync(); const prefixReg = /^AiSim\.[a-zA-Z]+@/; info.keys.forEach(storageKey => { if (prefixReg.test(storageKey)) { Taro.removeStorageSync(storageKey); } }); } } export const $localStorage = new LocalStorage();