🎨 https://github.com/siyuan-note/siyuan/issues/5066 removeData
This commit is contained in:
parent
7c7f3db0b8
commit
fdf9f0d9e4
1 changed files with 12 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue