提交 4e1497be 编写于 作者: 雪洛's avatar 雪洛

fix: 修正写法兼容多端

上级 cb6378e0
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
}, },
// 工具方法,用于快速设置 Element 的 style // 工具方法,用于快速设置 Element 的 style
setElementStyle(refName : string, propertyName : string, propertyStyle : any) : void { setElementStyle(refName : string, propertyName : string, propertyStyle : any) : void {
let element : Element | null = this.$elementMap.get(refName) let element : Element | null = (this.$data['$elementMap'] as Map<string, Element>).get(refName)
if (element == null) { if (element == null) {
element = this.$refs[refName] as Element; element = this.$refs[refName] as Element;
this.$elementMap.set(refName, element) (this.$data['$elementMap'] as Map<string, Element>).set(refName, element)
} }
element.style.setProperty(propertyName, propertyStyle); element.style.setProperty(propertyName, propertyStyle);
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册