如何使用 Office UI Fabric React 在 CommandBar 菜单中显示喙?

How to show beaks in CommandBar menus with Office UI Fabric React?

请看下面的演示:

https://rry5wyov7o.codesandbox.io

您会看到一个普通的 Office UI Fabric React CommandBar(在这种特殊情况下,它是某种菜单栏)。

现在在 Codesandbox 中查看完全相同的演示 IDE:

https://codesandbox.io/s/rry5wyov7o

偶然(可能是因为 IFrame 或其他原因),在 Codesandbox IDE 中弹出菜单时,您会在菜单顶部看到小喙。 其实我很喜欢那些喙,想在一些特殊情况下使用它们。

所以问题是:有没有办法在 Ofice UI Fabric React CommandBar 中 force/activate 这些喙?

给你:https://codesandbox.io/s/kx7w36xzv

我使用 buttonAs 属性提供了一个自定义按钮,它的 menuProps.isBeakVisibletrue

(顺便说一句,由于 iframe,喙不可见,但因为视口很小,默认情况下喙在较小的视口上可见。)