API

FUnitComparison

この API ページの本文は現在英語です。コードのシグネチャと識別子は表示言語によって変わりません。

A prepared semantic comparison that can be filtered and paged without rerunning product algorithms.

Access

Access through:

Setup

Register @univerjs-pro/edit-history or a preset that includes it. In plugin mode, import @univerjs-pro/edit-history/facade. Additional methods below require their listed plugin packages. See Facade setup.

@univerjs-pro/edit-history

FUnitComparison.query

Filters and pages this prepared comparison.

Product views can be discovered from query().scopes, then passed back through query.scope to request only the selected worksheet, slide, Base table, or Board page without rerunning the comparison algorithm.

TypeScript
query(query?: IUnitComparisonQuery): IUnitComparisonResult

Parameters

  • query — Optional. Optional scope, filters, result detail, and independent item/context pagination.

Returns

A versioned, serializable comparison result.

Examples

TypeScript
const comparison = univerAPI.prepareUnitComparison(input)const overview = comparison.query({ detail: UnitComparisonDetailLevel.SUMMARY })const firstScope = overview.scopes[0]const items =  firstScope === undefined    ? overview.items    : comparison.query({ scope: firstScope, limit: 1000 }).items

Types: IUnitComparisonResult · IUnitComparisonQuery

Package: @univerjs-pro/edit-history · Type definitions

このガイドはいかがですか?

© 2026 DreamNum Co., Ltd.