当属性设置为 false 时,元素内的 属性 是否仍然可见?

When an Attribute is set to false, is the property still observable inside the element?

@ lit-element -> Properties -> Configure attributes -> Configure observed attributes

指的是:

By default, LitElement creates a corresponding observed attribute for all declared properties.

To prevent an observed attribute from being created for a property, set attribute to false. The property will not be initialized from attributes in markup, and attribute changes won’t affect it.

澄清:

当观察到的属性被阻止时,属性 在元素中仍然是可观察的,不是吗?

蒂亚

是的。 属性 仍可从 javascript 中访问,并将触发重新渲染。