mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
<demo-block title="基础用法">
|
|
<van-collapse value="{{ active1 }}" data-key="active1" bind:change="onChange">
|
|
<van-collapse-item title="{{ title1 }}">{{ content1 }}</van-collapse-item>
|
|
<van-collapse-item title="{{ title2 }}">{{ content2 }}</van-collapse-item>
|
|
<van-collapse-item title="{{ title3 }}" disabled>{{ content3 }}</van-collapse-item>
|
|
</van-collapse>
|
|
</demo-block>
|
|
|
|
<demo-block title="手风琴">
|
|
<van-collapse value="{{ active2 }}" data-key="active2" accordion bind:change="onChange">
|
|
<van-collapse-item title="{{ title1 }}">{{ content1 }}</van-collapse-item>
|
|
<van-collapse-item title="{{ title2 }}">{{ content2 }}</van-collapse-item>
|
|
<van-collapse-item title="{{ title3 }}">{{ content3 }}</van-collapse-item>
|
|
</van-collapse>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义标题内容">
|
|
<van-collapse value="{{ active3 }}" data-key="active3" bind:change="onChange">
|
|
<van-collapse-item>
|
|
<view slot="title">
|
|
{{ title1 }}
|
|
<van-icon name="question-o" custom-class="van-icon-question" />
|
|
</view>
|
|
{{ content1 }}
|
|
</van-collapse-item>
|
|
<van-collapse-item
|
|
title="{{ title2 }}"
|
|
value="内容"
|
|
icon="shop-o"
|
|
>
|
|
{{ content2 }}
|
|
</van-collapse-item>
|
|
</van-collapse>
|
|
</demo-block>
|