0

在我们的 polymer1.0 组件中,我们有这个:

attached: function () 
{
    var something=this.getComputedStyleValue("--flxs-" + prop)
    this.async(function()
    {
        // do some work here.
    });
}

在 2.0 中,this.getComputedStyleValue this.async 都没有定义。

知道有什么替代方案吗?

4

1 回答 1

1

Polymer.Async似乎是this.async.

因为getComputedStyleValue您可以尝试StyleGather,但我怀疑它会起作用。

否则,LegacyMixin包含所有旧方法。

于 2017-04-03T06:02:23.010 回答