diff --git a/packages/devui-vue/docs/en-US/components/rate/index.md b/packages/devui-vue/docs/en-US/components/rate/index.md new file mode 100644 index 0000000000000000000000000000000000000000..607490ee06b3b87fd92288ae4cc3283e52b88e75 --- /dev/null +++ b/packages/devui-vue/docs/en-US/components/rate/index.md @@ -0,0 +1,161 @@ +# Rate + +Rate. + +### When To Use + +When you expect users to rate a product. + +### Demo + +### Read-only Mode + +:::demo + +```vue + + +``` + +::: + +### Dynamic Mode + +:::demo + +```vue + + +``` + +::: + +### Dynamic Mode-Custom + +:::demo + +```vue + + +``` + +::: + +### Half Star Mode + +:::demo + +```vue + + +``` + +::: + +### Use the type parameter + +:::demo + +```vue + + +``` + +::: + +### API + +d-rate parameter + +| Parameter | Type | Default | Description | Jump to Demo | +| :-------: | :-----------------------------: | :-----: | :-------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | +| read | `boolean` | false | Optional. This parameter specifies whether to enable read-only mode. In read-only mode, interaction is not supported. | [Read-only Mode](#read-only-mode) | +| count | `number` | 5 | Optional. Sets the total number of levels. | [Read-only Mode](#read-only-mode) | +| type | `'success'\|'warning'\|'error'` | -- | Optional. Set the current rating type. Different types correspond to different colors. | [Use the type parameter](#use-the-type-parameter) | +| color | `string` | -- | Optional. Star color. | [Dynamic Mode Custom](#dynamic-mode-custom) | +| icon | `string` | -- | Optional. Style of the rating icon. Only all icons in the DevUI icon library are supported. | [Dynamic Mode](#dynamic-mode) | +| character | `string` | -- | Optional. Scoring icon style. Only one of icon and character can be set. | [Dynamic Mode Custom](#dynamic-mode-custom) | +| allowHalf | `boolean` | false | Optional. Whether allow Half Selection in Dynamic Mode. | [Half Selection Mode](#half-star-mode) | + +d-rate event + +| Parameter | Type | Description | parameters | Jump to Demo | +| --------- | ---------------------- | ---------------------------- | ------------- | -------------------------------------- | +| change | `EventEmitter` | triggers when `count` change | the new count | [Half Selection Mode](#half-star-mode) |