Rating
Widget chọn số sao (1–N) — bind `int` của entity.
Source:
Core/Components/Rating.cs· ComType:Rating
Cấu hình
ComType: Rating
FieldName: Score
Label: Đánh giá
ShowLabel: true
Precision: 5 # số sao tối đa
Field DB dùng
| Field | Vai trò |
|---|---|
FieldName | Property của entity (int — số sao đã chọn). |
Precision | Số sao tối đa (default 5). |
Id | Định danh DOM (rare — Core auto-generate). |
Style | Inline CSS style (kích cỡ sao, màu). |
Events | JSON map event → method C# (Click). |
Events kích hoạt
| Event | Method signature |
|---|---|
click | (entity, rating) |
rating là chính component Rating (giá trị mới đã update vào entity.<FieldName>).
Tip
Precision= số sao tối đa (default 5).- Style custom (kích cỡ sao, màu) qua field
Style.