74 lines
1.3 KiB
Plaintext

<demo-block title="基础用法">
<van-rate
custom-class="van-rate"
data-key="value1"
value="{{ value1 }}"
/>
</demo-block>
<demo-block title="自定义图标">
<van-rate
custom-class="van-rate"
icon="like"
void-icon="like-o"
data-key="value2"
value="{{ value2 }}"
/>
</demo-block>
<demo-block title="自定义样式">
<van-rate
custom-class="van-rate"
data-key="value3"
value="{{ value3 }}"
size="{{ 25 }}"
color="#ee0a24"
void-color="#eee"
void-icon="star"
bind:change="onChange"
/>
</demo-block>
<demo-block title="半星">
<van-rate
custom-class="van-rate"
data-key="value4"
value="{{ value4 }}"
size="{{ 25 }}"
allow-half
color="#ee0a24"
void-color="#eee"
void-icon="star"
touchable="{{ false }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="自定义数量">
<van-rate
custom-class="van-rate"
data-key="value5"
value="{{ value5 }}"
count="{{ 6 }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="禁用状态">
<van-rate
custom-class="van-rate"
data-key="value6"
value="{{ value6 }}"
disabled
/>
</demo-block>
<demo-block title="只读状态">
<van-rate
custom-class="van-rate"
data-key="value6"
value="{{ value6 }}"
readonly
/>
</demo-block>