删除文件

This commit is contained in:
ival 2021-03-31 18:15:12 +08:00
parent 8ae7ff5a8c
commit 91fd06b695

View File

@ -1,63 +0,0 @@
export default class Storage {
constructor() {
this.map = new Map();
this.lst = new Set();
this.clipboard = [];
}
has(code) {
return code ? this.map.has(code) : false;
}
set(code, target) {
if (!this.has(code)) {
this.lst.add(code);
this.map.set(code, target);
}
}
get(code) {
return this.map.get(code);
}
delete(code) {
if (this.has(code)) {
this.map.delete(code);
this.lst.delete(code);
}
}
values() {
return Array.from(this.lst).map(code => { return this.get(code); });
}
clear() {
this.lst.clear();
this.map.clear();
}
isSelectExist(code) {
return this.has(code);
}
setClipboard(lst) {
this.clipboard = Array.from(lst);
}
clearClipboard() {
this.clipboard = [];
}
getClipboard() {
return this.clipboard;
}
getClipboardSize() {
return this.clipboard.length;
}
forEach() {
return this.map.forEach;
}
}