fix(core): should open a new tab with parameters (#8118)
Closes [AF-1343](https://linear.app/affine-design/issue/AF-1343/点击-center-peek-右侧的按钮时,应该携带参数)
This commit is contained in:
@@ -54,10 +54,14 @@ export class CMDKQuickSearchService extends Service {
|
||||
result.source === 'docs' &&
|
||||
track.$.cmdk.results.searchResultsDocs();
|
||||
|
||||
this.workbenchService.workbench.openDoc({
|
||||
const options: { docId: string; blockIds?: string[] } = {
|
||||
docId: doc.docId,
|
||||
blockId: doc.blockId,
|
||||
});
|
||||
};
|
||||
if (doc.blockId) {
|
||||
options.blockIds = [doc.blockId];
|
||||
}
|
||||
|
||||
this.workbenchService.workbench.openDoc(options);
|
||||
} else if (result.source === 'collections') {
|
||||
this.workbenchService.workbench.openCollection(
|
||||
result.payload.collectionId
|
||||
|
||||
Reference in New Issue
Block a user