Skip to content

Commit

Permalink
fix(hm): 修复 getPropertyValue 方法中获取属性没有兼容原型链上取值的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
shenmin.JIN authored and jxxbd91 committed Dec 6, 2024
1 parent 8501202 commit 7814623
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class CSSStyleDeclaration {
prop = prop.includes('-') ? toCamelCase(prop) : prop
const node = this.el
const value = node._st[prop]
return value === undefined ? '' : value
// 兼容原型链上的取值
return value === undefined ? this[prop] ?? '' : value
}

public removeProperty (prop: string): string | number {
Expand Down

0 comments on commit 7814623

Please sign in to comment.