setProperty
设置 UI 控件属性。
类型
(propertyId: string, val: any) => void
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| propertyId | 属性 id | PropertyId |
| val | 设置值(当 property 为 hmUI.prop.MORE 时, val 与 createWidget 的 option 用法一致,可设置多个参数) | any |
PropertyId
列举控件通用支持的属性
| 属性 | 说明 | 类型 |
|---|---|---|
| x | 控件 x 坐标 | number |
| y | 控件 y 坐标 | number |
| w | 控件显示宽度 | number |
| h | 控件显示高度 | number |
| VISIBLE | 控件是否可见,true 为可见、false 不可见,该属性不支持 setProperty(hmUI.prop.MORE, {}),只支持 setProperty 单独设置 VISIBLE 属性 | boolean |