0
我想将数据绑定到一个对象,但我不知道它为什么不工作。感谢您能否提供帮助。谢谢!聚合物对象数据绑定不起作用
我如何尝试将数据绑定:
<mypolymer attributes.myarray='["A","B","C"]' attributes.mynestedobject.attack='{"physical": 50, "magic":10}'></mypolymer>
我聚合物元件:
Polymer({
is: "mypolymer",
properties: {
attributes: {
type: Object,
value: {
myarray: [],
mynestedobject: {
attack: {
physical: 0,
magic: 0
}
}
}
}
}
)}