Home > IPCB_PrimitiveComponent > setAttribute
IPCB_PrimitiveComponent.setAttribute() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性
Signature
typescript
setAttribute(key: string, value?: string | number | boolean, keyVisible?: boolean, valueVisible?: boolean): Promise<IPCB_PrimitiveAttribute>;1
Parameters
Parameter | Type | Description |
|---|---|---|
key | string | 属性名,如若器件不存在该属性名的属性,将会新增该属性 |
value | string | number | boolean | (Optional) 属性值 |
keyVisible | boolean | (Optional) 属性名可见性 |
valueVisible | boolean | (Optional) 属性值可见性 |
Returns
Promise<IPCB_PrimitiveAttribute>
属性图元对象