虽然 Blockly 提供许多有用的字段,但您的应用可能具有特殊情况。以下是自定义字段的几个步骤:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["Blockly offers customization options beyond its built-in fields, allowing developers to tailor fields to their specific needs."],["Before creating a new field type, explore existing fields, validators, and extension capabilities for potential solutions."],["Leverage validators to control accepted values, modify input, or trigger actions based on field value changes."],["Extend existing fields to modify their editor, appearance, or displayed text while inheriting core functionality."],["Creating a new field type is the most powerful but time-intensive option, reserved for storing new value types."]]],["Customizing Blockly fields involves several steps: First, review documentation of similar fields for potential customization options. Second, use validators to control accepted values, modify input, or trigger actions upon value changes. Third, extend existing fields by creating subclasses to modify their editor, appearance, or displayed text. Finally, create a new field type for storing novel value types, though this is the most complex option.\n"]]