You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by 张翰 <ha...@alibaba-inc.com> on 2017/10/13 16:32:38 UTC

回复:hwo weex to detect array data change in order to refresh list

Hi,
According to my experience, if you have a doubt about the feature of Vue.js, the more efficient way is to search the documents and try it.
Here is my search result. [1]
You can use Vue.set or Array.prototype.splice to update the specific item in the array. The $set method on Array.prototype is used in Vue.js 1.0 and already removed in Vue.js 2.0. [2] Weex only supports Vue.js 2.x. In addition, I wrote an example for you. [3] 
However, I think this question should be asked on StackOverflow instead of the mailing list.

[1] https://vuejs.org/v2/guide/list.html#Array-Change-Detection[2] https://vuejs.org/v2/guide/migration.html#Array-prototype-set-removed[3] http://dotwe.org/vue/2d639a533be62d95af0e8607373a67f5
Best wishes,
Hanks------------------------------------------------------------------发件人:wcxwave <wc...@aliyun.com>发送时间:2017年10月13日(星期五) 21:56收件人:dev <de...@weex.incubator.apache.org>主 题:hwo weex to detect  array data change in order to refresh list
Hi,    In vue, we can use this.arr_list.$set(index, {name:value, img: url}) to trigger dom change.   But in weex, can we use $set function???   Which kind of way  is used in weex to  detect  list data change  so the dom can trigger UI updated ?