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
}
}
}
}
}
)}