简体   繁体   English

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

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

Please have a look the following demo:请看下面的演示:

https://rry5wyov7o.codesandbox.io https://rry5wyov7o.codesandbox.io

You see a normal Office UI Fabric React CommandBar (in this special case it's some kind of menu bar).您会看到一个普通的 Office UI Fabric React CommandBar(在这种特殊情况下它是某种菜单栏)。

Now have a look at the exactly same demo in the Codesandbox IDE:现在看看 Codesandbox IDE 中完全相同的演示:

https://codesandbox.io/s/rry5wyov7o https://codesandbox.io/s/rry5wyov7o

By accident (maybe because of the IFrame or whatever), in the Codesandbox IDE when the menus pop out you see little beaks at the top of the menus.偶然地(可能是因为 IFrame 或其他原因),在 Codesandbox IDE 中,当菜单弹出时,您会在菜单顶部看到小喙。 Actually, I like those beaks and want to use them in some special cases.实际上,我喜欢那些喙,并希望在某些特殊情况下使用它们。

So the question is: Is there a way to force/activate these beaks in an Ofice UI Fabric React CommandBar?所以问题是:有没有办法在 Office UI Fabric React CommandBar 中强制/激活这些喙?

Here you go: https://codesandbox.io/s/kx7w36xzv给你: https : //codesandbox.io/s/kx7w36xzv

I used buttonAs prop to provide a custom button which has it's menuProps.isBeakVisible as true我使用buttonAs prop 来提供一个自定义按钮,它的menuProps.isBeakVisibletrue

(On a side note, the beaks were not visible because of the iframe but because the viewport was small and beaks are visible by default on smaller viewports.) (附带说明,由于 iframe,喙不可见,但因为视口很小,并且喙在较小的视口上默认可见。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM