添加清理打开过的文件缓存
This commit is contained in:
parent
6f35b90c88
commit
c8cbb4ccef
@ -21,11 +21,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
cleanCache() {
|
||||
new Promise((resolve) => {
|
||||
Object.keys(localStorage).forEach((item) => {
|
||||
if (item.indexOf("file_path_") !== -1) {
|
||||
localStorage.removeItem(item);
|
||||
}
|
||||
});
|
||||
resolve();
|
||||
}).then(() => {
|
||||
this.$notify({
|
||||
title: this.$t("notify.title"),
|
||||
message: this.$t("setting.clear.success"),
|
||||
type: "success",
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user