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

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: { 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",
});
}); });
}, },
}, },