This commit is contained in:
Vanessa 2023-05-15 22:33:36 +08:00
parent 7c7f3db0b8
commit fdf9f0d9e4

View file

@ -109,6 +109,18 @@ export class Plugin {
});
}
public removeData(storageName: string) {
return new Promise((resolve) => {
if (!this.data) {
this.data = {};
}
fetchPost("/api/file/removeFile", {path: `/data/storage/petal/${this.name}/${storageName}`}, (response) => {
delete this.data[storageName];
resolve(response);
});
});
}
public addTab(options: {
type: string,
destroy?: () => void,