添加清理打开过的文件缓存
This commit is contained in:
parent
6f35b90c88
commit
c8cbb4ccef
@ -21,10 +21,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cleanCache() {
|
cleanCache() {
|
||||||
this.$notify({
|
new Promise((resolve) => {
|
||||||
title: this.$t("notify.title"),
|
Object.keys(localStorage).forEach((item) => {
|
||||||
message: this.$t("setting.clear.success"),
|
if (item.indexOf("file_path_") !== -1) {
|
||||||
type: "success",
|
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