在 Polymer 1.0 中,我可以声明属性:
properties: {
salary: {
type: Number,
value: 80
}
}
现在在 Polymer 2.0(创建一个类)中,我应该编写如下方法:
static get properties() {
return {
salary: {
type: Number,
value: 80
}
}
}
但现在this.properties
是null
。如何访问该properties
字段(而不是 的值properties
)?