setData 像数组新对象后,页面绑定的数组length没更新

发布于 6 年前作者 jun7719433 次浏览最后编辑 6 年前来自 ask

我用setData去向数组追加新元素。绑定了数组数据的页面也更新了。但是绑定数组 length 的没有更新

<button class="pull-right" type="primary" size="mini"  bindtap="addTable"  disabled="{{courseList.length >= 5}}"> 新增课表 </button>

但是我在页面中直接打印

{{courseList.length}}

是有动态更新的。

为了buttom 的disabeled却不生效呢?

0 回复
暂无回复