1. getComponentsAttribute
通过构件key获取构件的属性。
1.1. 参数说明:
名称 | 说明 | 类型 | 是否必填 | 示例 |
---|---|---|---|---|
key | 构件key | 字符串 string | 是 | M123456_123456 |
callback | 回调函数 | 函数 function | 是 | function(){} |
返回值说明 | 类型 | 示例 |
---|---|---|
无返回值 | NULL | NULL |
1.2. 调用方式:
/**
* 获取构件的属性
* @getComponentAttribute
* @param {string} key 构件的key
* @param {function} callback 回调函数
* @return {void}
*/
compare.getComponentsAttributeByKey("M123_234567",function(result)
{console.log(result)});