feat(editor-core): async block support remove property

This commit is contained in:
lawvs
2022-07-27 15:56:29 +08:00
parent bea829efd6
commit 91781b4d75
2 changed files with 17 additions and 0 deletions

View File

@@ -453,6 +453,18 @@ export class AsyncBlock {
});
}
async removeProperty<
T extends keyof DefaultColumnsValue = keyof DefaultColumnsValue
>(key: T) {
return this.services.update({
id: this.id,
workspace: this.raw_data.workspace,
properties: {
[key]: undefined,
},
});
}
private async load_node(id: string): Promise<AsyncBlock | null> {
return await this.services.load({
workspace: this.raw_data.workspace,