API 浏览器
评分

Quasar 评级是一个允许用户对项目进行评级的组件,通常称为“星级评定”。

¥Quasar Rating is a Component which allows users to rate items, usually known as “Star Rating”.

Loading QRating API...

用法(Usage)

¥Usage

基本(Basic)

¥Basic

Basic



Custom number of choices



图标(Icons)

¥Icons

Image icons



在下面的示例中,当使用 icon-selected 属性时,请注意我们仍然可以使用 icon 属性。当图标未被选中时,后者会变为图标。

¥In the example below, when using the icon-selected prop, notice we can still use icon as well. The latter becomes the icon(s) when they are not selected.

Different icon when selected



Different icon for each rating



颜色(Colors)

¥Colors

使用 color-selected 属性时,请注意我们仍然可以使用 color。当图标未被选中时,后者会变为图标的颜色。

¥When using the color-selected prop, notice we can still use color as well. The latter becomes the color(s) of the icons when they are not selected.

Different color for each rating



浮动编号(Floating number)

¥Floating number

Different icon and color when half selected



无亮度调节(No dimming)

¥No dimming

No dimming



工具提示(Tooltips)

¥Tooltips

请注意,在下面的示例中,我们如何为每个图标添加工具提示。

¥Notice how we can add tooltips to each icon in the example below.

With QTooltip



尺寸(Sizes)

¥Sizes

除了以下标准尺寸外,你还可以通过 size 属性定义自己的尺​​寸。

¥Apart from the standard sizes below, you can define your own through the size property.

Standard sizes



只读并禁用(Readonly and disable)

¥Readonly and disable

Readonly and disable



原生表单提交(Native form submit)

¥Native form submit

当处理具有 actionmethod 的原生表单时(例如,将 Quasar 与 ASP.NET 控制器结合使用时),你需要在 QRating 上指定 name 属性,否则 formData 将不会包含该属性(如果应该包含的话):

¥When dealing with a native form which has an action and a method (eg. when using Quasar with ASP.NET controllers), you need to specify the name property on QRating, otherwise formData will not contain it (if it should):

Native form