mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 https://github.com/siyuan-note/siyuan/issues/5066 removeData
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user