天波用户运营管理后台系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
556B

  1. /*
  2. * @Date: 2021-12-08 16:23:20
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2022-08-12 14:21:39
  5. * @FilePath: \TelpoUserManageAdmin\src\utils\clear-local-storage.js
  6. * @description: 增加 清除local Storage的方法
  7. */
  8. const prefix = 'telpo_user_admin_';
  9. const LocalStorageService = {
  10. clearAll(store) {
  11. for (let k in store.getters) {
  12. this.clear(store, k);
  13. }
  14. },
  15. clear(store, type) {
  16. store.commit(type, '');
  17. window.localStorage[ prefix + type ] = '';
  18. },
  19. };
  20. export default LocalStorageService;