使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
blockly > MenuOption
下拉菜单中的单个选项。对于菜单分隔符项,可以是字符串字面量 separator
;对于普通操作菜单项,可以是数组。在后一种情况下,第一个元素是可读取的值(文本、ImageProperties 对象或 HTML 元素),第二个元素是无语言差异的值。
Signature:
export type MenuOption = [string | ImageProperties | HTMLElement, string] | 'separator';
参考文献: ImageProperties
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The `MenuOption` type defines a single option within a dropdown menu. It's structured as a tuple, with two elements. The first element is the human-readable representation of the option, which can be either a string or an image. The second element is a language-neutral string value associated with that option. This type is used within the Blockly system.\n"],null,[]]