string 检查器类型允许输入单行文本,并以简单的文本输入字段表示。该编辑器没有任何特定参数。该编辑器的可选 default 参数应包含一个字符串。
public function defineProperties()
{
return [
'firstName' => [
'title' => 'First Name',
'type' => 'string',
'default' => 'John'
]
];
}生成的输出是一个字符串值,对应于所选选项,例如:
"firstName": "Sam"以下 配置值 常用。
| Property | Description |
|---|---|
| title | title for the property. |
| description | a brief description of the property, optional. |
| default | specifies a default string value, optional. |
| showExternalParam | specifies visibility of the external parameter editor for the property in the Inspector. Default: true. |