You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by wcxwave <wc...@aliyun.com> on 2017/10/12 09:29:33 UTC

weex的列表能否强制刷新数据

Hi Weex Devs,
Weex用了有一段时间了,目前遇到一个比较怪异的问题。
                                                            
weex的列表下来刷新,比如:数组的内容在前面插入3条记录a,b,c.
新增数据不会在列表前头显示出来。而是在后面显示出来。
我的list的cell如下:
<list>
<cell  v-for="(item,index) in page_data.listData" class="listcell"   append="node" :ref="'cell'+index">
   <image :src="item.imgsrc " class="image  imageload"  ></image>
   <text class="icon_relative">{{item.number_comment}}</text>    
</cell>
</list>另外如果把page_data.listData的数组切换到新的数组,发现页面上图片不会变换,但文字部分变换了。是不是weex里面的image有cache?
问一下,有没有一种机制,可以通知weex强制刷新所有图片? 我们先前是先对page_data.listData赋值一个空数组,然后开启一个定时器,再赋值新的数组。但这样页面会有一个空白的闪屏。
这个问题一直都存在,升级到最新的weex-vue-render的版本也还是存在。  "dependencies": {
    "caniuse-api": "^1.6.1",
    "file-loader": "^0.11.1",
    "qs": "^6.4.0",
    "url-loader": "^0.5.8",
    "vue": "^2.1.8",
    "vue-router": "^2.1.1",
    "vuex": "^2.1.1",
    "vuex-router-sync": "^4.0.1",
    "weex-vue-render": "^0.12.20"
  },

Re:weex的列表能否强制刷新数据

Posted by Adam Feng <cx...@gmail.com>.
First of all,  please use English,  as diversity is important for the community. I know this is difficult, especially since most of the developers are Chinese, probably with limited English fluency  like me... But we still need to try our best to get the discussion in English,  in order to make everyone understand the things discussed in the mailing list.

Second,  please show me a demo in http://dotwe.org/vue/ for the issue and tell the reproducible steps in detail.

Thanks.
Adam Feng

On 12 Oct 2017, 5:37 PM +0800, wcxwave <wc...@aliyun.com>, wrote:
> Hi Weex Devs,
> Weex用了有一段时间了,目前遇到一个比较怪异的问题。
>
> weex的列表下来刷新,比如:数组的内容在前面插入3条记录a,b,c.
> 新增数据不会在列表前头显示出来。而是在后面显示出来。
> 我的list的cell如下:
> <list
> <cell v-for="(item,index) in page_data.listData" class="listcell" append="node" :ref="'cell'+index"
> <image :src="item.imgsrc " class="image imageload" ></image
> <text class="icon_relative">{{item.number_comment}}</text
> </cell
> </list>另外如果把page_data.listData的数组切换到新的数组,发现页面上图片不会变换,但文字部分变换了。是不是weex里面的image有cache?
> 问一下,有没有一种机制,可以通知weex强制刷新所有图片? 我们先前是先对page_data.listData赋值一个空数组,然后开启一个定时器,再赋值新的数组。但这样页面会有一个空白的闪屏。
> 这个问题一直都存在,升级到最新的weex-vue-render的版本也还是存在。  "dependencies": {
>     "caniuse-api": "^1.6.1",
>     "file-loader": "^0.11.1",
>     "qs": "^6.4.0",
>     "url-loader": "^0.5.8",
>     "vue": "^2.1.8",
>     "vue-router": "^2.1.1",
>     "vuex": "^2.1.1",
>     "vuex-router-sync": "^4.0.1",
>     "weex-vue-render": "^0.12.20"
>   },