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
你覺得這篇文檔如何?