mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
* feat(Rate): css variables * fix(Rate): adjust less variables name * fix(Rate): adjust less variables name * docs(Rate): adjust doc - 示例与文档对应 - 对照vant文档做了一些调整 - 增加 `监听 change 事件` - 删除 `props` 中的版本列 * fix(Rate): adjust demo
71 lines
1.3 KiB
Plaintext
71 lines
1.3 KiB
Plaintext
<demo-block title="基础用法">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
model:value="{{ value1 }}"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义图标">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
icon="like"
|
|
void-icon="like-o"
|
|
model:value="{{ value2 }}"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义样式">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
model:value="{{ value3 }}"
|
|
size="{{ 25 }}"
|
|
color="#ffd21e"
|
|
void-icon="star"
|
|
void-color="#eee"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="半星">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
model:value="{{ value4 }}"
|
|
allow-half
|
|
void-icon="star"
|
|
void-color="#eee"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义数量">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
model:value="{{ value5 }}"
|
|
count="{{ 6 }}"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="禁用状态">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
value="{{ value6 }}"
|
|
disabled
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="只读状态">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
value="{{ value6 }}"
|
|
readonly
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block title="监听 change 事件">
|
|
<van-rate
|
|
custom-class="rate-position"
|
|
value="{{ value8 }}"
|
|
bind:change="onChange"
|
|
/>
|
|
</demo-block>
|
|
|
|
<van-toast id="van-toast" />
|