获取标签属性(:label)
函数
文本内容 = obj:label()
返回值
- 文本内容 文本型
- 获取成功返回文本 失败 返回 nil
说明
该函数用来 获取 节点对象 的标签属性(如果存在的话)
此方法只能在 2.3.0以上版本中使用
示例
local node = nodeView.matchForMainWindow(function (info) --匹配节点信息 label==点赞 class==AWEFeedVideoButton 此函数返回节点对象数组 数组型
return info.label == "点赞" and info.class == "AWEFeedVideoButton"
end ,true) --第二个参数为 true 时 返回 对象数组
print(node[1]:label()) --打印出标签属性