0
的阵列变化我有:数据绑定功能不检测对象
<template is="dom-repeat"
initial-count="1"
index-as="index"
items="{{uploadState}}">
<div hidden="[[getState(index)]]" class="layout vertical center-center">
和我有:
properties: {
uploadState: {
type: Array,
value: function() {
var arr = Array.apply(null, Array(1));
var newArray = arr.map(()=> {
return { value: false };
});
return newArray;
},
notify: true
},
getState: function(index) {
var uploaded = this.get(['uploadState', index]);
// use this.linksPath??
return uploaded.value;
}
和:
changeState: function(index) {
this.uploadState[index].value = true;
}
当我改变this.uploadState[0].value
为假hidden="[[getState(index)]]"
没有检测到变化。
我将如何使hidden
检测到更改?我读了这similar issue,但不知道我将如何使用linkPath
对此。