2.0.3 • Published 5 months ago

@wu-component/wu-rate v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Rate 评分

评分组件。

基础用法

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-rate value="1" id="rateTest"></wu-plus-rate>
        <wu-plus-rate id="rateTest2"></wu-plus-rate>
    </div>
</template>
<script>
</script>

:::

自定义颜色

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-rate id="rateTest2" colors="['blue', 'blue', 'blue', 'blue','blue']"></wu-plus-rate>
    </div>
</template>
<script>
</script>

:::

辅助文字

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-rate id="rateTest5" show-text="true"></wu-plus-rate>
        <wu-plus-rate id="rateTest6" show-text="true" texts="['差', '不太好', '一般', '还行', '特别好']"></wu-plus-rate>
    </div>
</template>
<script>
</script>

:::

禁用

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-rate id="rateTest7" value="2" show-text="true" disabled="true"></wu-plus-rate>
    </div>
</template>
<script>
</script>

:::

自定义图标

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-rate id="rateTest7" value="2" rate-list="['①', '②', '③', '④', '⑤']"></wu-plus-rate>
    </div>
</template>
<script>
</script>

:::

Attributes

参数说明类型可选值默认值
value当前值Number以0开始--
max默认为5, 如果自定义的max 大于5时,需要传入colors、rate-list,texts 酌情使用Number正整数5
disabled禁用Booleantrue、falsefalse
colorsicon 的颜色集合,数组长度和ma一致string[]任意颜色集合 '#F7BA2A', '#F7BA2A', '#F7BA2A', '#F7BA2A', '#F7BA2A'
void-color未选中 icon 的颜色String--#C6D1DE
disabled-void-color禁用未选中 icon 的颜色String--#EFF2F7
show-text是否显示辅助文字,若为真,则会从 texts 数组中选取当前分数对应的文字内容Booleantrue、falsefalse
text-color辅助文字的颜色String--#1f2d3d
texts辅助文字数组String[]-- '极差', '失望', '一般', '满意', '惊喜'

Event

事件名说明参数
change值修改(event: CustomEvent) => void
2.0.3

5 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.11.8

1 year ago

1.11.6

1 year ago

1.11.4

1 year ago

1.10.6

1 year ago

1.10.1

1 year ago

1.9.24

2 years ago

1.9.21

2 years ago

1.9.20

2 years ago

1.9.17

2 years ago

1.9.1

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.0.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago