1

我正在实现一个带有几个按钮的命令栏。按钮的类型为 ICommandBarItemProps,并分配给 . 现在我想为使用 componentRef 的按钮之一设置焦点以实现可访问性,但它说在 IContextualMenuRenderItem 上找不到 focus() (IRefObject 是 componentRef 的类型)。我检查了这个接口的文档,没有发现 focus() 支持。https://developer.microsoft.com/en-us/fluentui#/controls/web/contextualmenu#IContextualMenuRenderItem

我们如何将焦点设置在 ICommandBarItemProps 类型的命令栏按钮上?

4

0 回答 0