添加清理打开过的文件缓存

This commit is contained in:
Aicirou 2020-05-30 19:50:48 +08:00
parent 6f35b90c88
commit c8cbb4ccef

View File

@ -21,10 +21,19 @@ export default {
},
methods: {
cleanCache() {
this.$notify({
title: this.$t("notify.title"),
message: this.$t("setting.clear.success"),
type: "success",
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",
});
});
},
},