mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-21 16:26:58 +08:00
refactor(editor): rename model.doc to store (#12172)
This commit is contained in:
@@ -43,7 +43,7 @@ export class SurfaceRefNotePortal extends WithDisposable(ShadowlessElement) {
|
||||
let parent: BlockModel | null = this.model;
|
||||
while (parent) {
|
||||
this.ancestors.add(parent.id);
|
||||
parent = this.model.doc.getParent(parent.id);
|
||||
parent = this.model.store.getParent(parent.id);
|
||||
}
|
||||
const query: Query = {
|
||||
mode: 'include',
|
||||
@@ -54,7 +54,7 @@ export class SurfaceRefNotePortal extends WithDisposable(ShadowlessElement) {
|
||||
};
|
||||
this.query = query;
|
||||
|
||||
const doc = this.model.doc;
|
||||
const doc = this.model.store;
|
||||
this._disposables.add(() => {
|
||||
doc.doc.removeStore({ query, readonly: true });
|
||||
});
|
||||
@@ -118,7 +118,7 @@ export class SurfaceRefNotePortal extends WithDisposable(ShadowlessElement) {
|
||||
console.error('Query is not set before rendering note preview');
|
||||
return nothing;
|
||||
}
|
||||
const doc = this.model.doc.doc.getStore({
|
||||
const doc = this.model.store.doc.getStore({
|
||||
query: this.query,
|
||||
readonly: true,
|
||||
});
|
||||
|
||||
@@ -402,7 +402,7 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
|
||||
openMode?: OpenDocMode;
|
||||
event?: MouseEvent;
|
||||
} = {}) => {
|
||||
const pageId = this.referenceModel?.surface?.doc.id;
|
||||
const pageId = this.referenceModel?.surface?.store.id;
|
||||
if (!pageId) return;
|
||||
|
||||
this.std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.next({
|
||||
|
||||
Reference in New Issue
Block a user