Rate 评分
Display · Interactive component
Rating selection.
On-demand import
wbbb-ui/components/rateBasic Usage
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbRate } from 'wbbb-ui/components/rate'
import 'wbbb-ui/styles/rate'
const value = ref('')
</script>
<template>
<WbbbRate v-model="value" />
</template>States and Interaction
All listed states can be operated and verified in the live Playground preview.
DefaultFilledFocusDisabledError
API Reference
Props
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
color | Sets the primary display color. | string | '' | No |
count | Sets the number of rendered placeholder rows or items. | number | 5 | No |
disabled | Prevents user interaction with the component. | boolean | false | No |
modelValue | Provides the current value used by v-model. | number | 0 | No |
Events
update:modelValuechange
Slots
None
Two-way binding
Supports v-model (modelValue).
Platform Notes
Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.
Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.
Usage note: Use Playground to verify further state combinations and cross-platform behavior.
