mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
<demo-block title="基本用法">
|
|
<van-radio-group value="{{ radio1 }}" data-key="radio1" bind:change="onChange" custom-class="demo-radio-group">
|
|
<van-radio name="1" custom-class="demo-radio">单选框 1</van-radio>
|
|
<van-radio name="2" custom-class="demo-radio">单选框 2</van-radio>
|
|
</van-radio-group>
|
|
</demo-block>
|
|
|
|
<demo-block title="禁用状态">
|
|
<van-radio-group value="{{ radio2 }}" data-key="radio2" bind:change="onChange" disabled custom-class="demo-radio-group">
|
|
<van-radio name="1" custom-class="demo-radio">单选框 1</van-radio>
|
|
<van-radio name="2" custom-class="demo-radio">单选框 2</van-radio>
|
|
</van-radio-group>
|
|
</demo-block>
|
|
|
|
<demo-block title="与 Cell 组件一起使用">
|
|
<van-radio-group value="{{ radio3 }}">
|
|
<van-cell-group>
|
|
<van-cell title="单选框 1" clickable data-value="1" bind:click="onClick">
|
|
<van-radio name="1" />
|
|
</van-cell>
|
|
<van-cell title="单选框 2" clickable data-value="2" bind:click="onClick">
|
|
<van-radio name="2" />
|
|
</van-cell>
|
|
</van-cell-group>
|
|
</van-radio-group>
|
|
</demo-block>
|