mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
refactor(editor): reduce getService (#10100)
This commit is contained in:
@@ -76,10 +76,6 @@ export class BlockRenderer
|
||||
return this.host?.doc.getBlock(this.rowId)?.model;
|
||||
}
|
||||
|
||||
get service() {
|
||||
return this.host.std.getService('affine:database');
|
||||
}
|
||||
|
||||
override connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (this.model && this.model.text) {
|
||||
|
||||
@@ -123,10 +123,6 @@ abstract class BaseTextCell extends BaseCellRenderer<Text> {
|
||||
return this.host?.std.get(DefaultInlineManagerExtension.identifier);
|
||||
}
|
||||
|
||||
get service() {
|
||||
return this.host?.std.getService('affine:database');
|
||||
}
|
||||
|
||||
get topContenteditableElement() {
|
||||
const databaseBlock =
|
||||
this.closest<DatabaseBlockComponent>('affine-database');
|
||||
|
||||
Reference in New Issue
Block a user