提交 f9eba1af 编写于 作者: Q qiang

fix: App、H5 修复节点信息未包含 computedStyle 的问题 question/108387

上级 be7a6e53
......@@ -62,7 +62,7 @@ function getNodeInfo (el, fields) {
}
}
// TODO 组件 props
if (fields.properties) {
if (Array.isArray(fields.properties)) {
fields.properties.forEach(prop => {
prop = prop.replace(/-([a-z])/g, function (e, t) {
return t.toUpperCase()
......@@ -76,8 +76,16 @@ function getNodeInfo (el, fields) {
} else {
info.scrollLeft = 0
info.scrollTop = 0
info.scrollHeight = 0
info.scrollWidth = 0
}
}
if (Array.isArray(fields.computedStyle)) {
const sytle = getComputedStyle(el)
fields.computedStyle.forEach(name => {
info[name] = sytle[name]
})
}
if (fields.context) {
if (el.__vue__ && el.__vue__._getContextInfo) {
info.context = el.__vue__._getContextInfo()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册