weex
weex copied to clipboard
list 分组问题
list 的 header 和 cell 该如何进行 repeat 分组呢?我想像下面那样进行repeat ,但list里不支持div, 那该如何repeat 呢?
<list>
<div repeat="item in rows" >
<header class = "header" >
<text class="item-title">标题</text>
</header>
<cell >
<text class="item-title">row0 </text>
<text class="item-title">row1 </text>
<text class="item-title">row2 </text>
</cell>
</div>
</list>
cell header 必须做完 list 的一级子元素,这种效果暂时还做不到,但可以用:
<template>
<list>
<cell repeat="item in rows">
<item-header>...</item-header>
<item-content>...</item-content>
</cell>
</list>
</template>
<item-*> 是示意的内容
@Jinjiang 这种办法header就不能悬浮了