|
[多端开发]
listview v-if 判断多种状态
[复制链接]
<list-view id="listView" class="main" enable-back-to-top onscrolltolower={this.onscrolltolower}>
<cell class="cell" onclick={this.itemClick}>
<view v-if={item.type==='1'}>
<text class="title">{item.title}</text>
<text class="subtitle">{item.subtitle}</text>
</view>
<div v-if={item.type==='2'}>
<text>123</text>
<text>{item.subtitle}</text>
</div>
</cell>
<list-footer class="footer">
<text>加载中...</text>
</list-footer>
</list-view>
这两种情况都出现了 v-if 没有效果
|
|