FGroup
本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。
The facade class for a slide group element.
Access
Access through:
Inheritance
Extends FPageElement. Its inherited members are available on this object.
Setup
Register @univerjs-pro/slides or a preset that includes it. In plugin mode, import @univerjs-pro/slides/facade. Additional methods below require their listed plugin packages. See Facade setup.
@univerjs-pro/slides
FGroup.getChildren
Get the direct children of this group.
TypeScript
getChildren(): FSlidePageElement[]Returns
The direct child elements in group order.
Examples
TypeScript
const fPresentation = univerAPI.getActivePresentation()const fSlide = fPresentation.getSlideByIndex(0)const groups = fSlide.getGroups()console.log(groups[0]?.getChildren())Types: FSlidePageElement
Package: @univerjs-pro/slides · Type definitions
FGroup.ungroup
Ungroup this group and return the released child element facades.
TypeScript
ungroup(): FSlidePageElement[]Returns
The direct child elements that were released.
Examples
TypeScript
const fPresentation = univerAPI.getActivePresentation()const fSlide = fPresentation.getSlideByIndex(0)const group = fSlide.getGroups()[0]if (group) { group.ungroup()}Types: FSlidePageElement
Package: @univerjs-pro/slides · Type definitions
你觉得这篇文档如何?