vant中Collapse
时间: 2023-12-16 17:43:20 浏览: 140
vantweapp源代码
问题: vant中的Collapse组件有哪些使用方法?
回答: vant中的Collapse组件有两种使用方法。
方法一是通过将v-for指令写在van-collapse标签里,这样点击某个折叠,其他折叠也会展开,但name属性不起作用。示例代码如下:
```
<van-collapse v-model="activeName">
<van-collapse-item name="">
<!-- 内容 -->
</van-collapse-item>
</van-collapse>
```
<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Vant 的collapse折叠面板的使用,解决循环,迭代,点击全部展开,点击单个展开](https://blog.csdn.net/u013017173/article/details/108369272)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [vant的Collapse 折叠面板和单元格中使用v-for](https://blog.csdn.net/fffvdgjvbsfkb123456/article/details/105110586)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文