mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): optimize store map (#10246)
This commit is contained in:
@@ -404,7 +404,6 @@ export function createLinkedDocFromSlice(
|
||||
snapshots: BlockSnapshot[],
|
||||
docTitle?: string
|
||||
) {
|
||||
// const modelsWithChildren = (list:BlockModel[]):BlockModel[]=>list.flatMap(model=>[model,...modelsWithChildren(model.children)])
|
||||
const linkedDoc = doc.workspace.createDoc({});
|
||||
linkedDoc.load(() => {
|
||||
const rootId = linkedDoc.addBlock('affine:page', {
|
||||
|
||||
@@ -246,7 +246,9 @@ export class EmbedLinkedDocBlockComponent extends EmbedBlockComponent<EmbedLinke
|
||||
}
|
||||
|
||||
get linkedDoc() {
|
||||
return this.std.workspace.getDoc(this.model.pageId);
|
||||
return this.std.workspace.getDoc(this.model.pageId, {
|
||||
id: this.model.pageId,
|
||||
});
|
||||
}
|
||||
|
||||
private _handleDoubleClick(event: MouseEvent) {
|
||||
|
||||
Reference in New Issue
Block a user