clear: function()

in src/framework/Persistant.ts [76:89]


  clear: function(persistant?: PersistantConf){
    const pprefix = persistant?.localStorageKeyPrefix;
    if(pprefix) { // 提交成功,删掉所有的本地存储
      for(let key of Object.keys(localStorage)){
        try {
          if(_.startsWith(key, pprefix)) {
            localStorage.removeItem(key);
          }
        } catch(e) { // 出错不能影响主流程
          console.log(e);
        }
      }
    }
  }