# rate

# Schema类静态属性

Schema类静态属性请访问 Schema.js类静态属性值逻辑与事件逻辑关系

{
  widget: 'rate',
  title: '评分',
  preview: '',
  type: 'number',
  validators: [],
  logic: {
    value: ['=', '!='],
    event: []
  }
}
1
2
3
4
5
6
7
8
9
10
11

# schema.default

默认0

# schema.option定义

schema完整定义请访问schema

{
  "count": 5,          // 总分数,不小于零的整数
  "allowHalf": false,  // 是否允许半选
  "showText": false    // 是否显示提示文案
}
1
2
3
4
5

# 示例展示

  • schema







 
 






















 
 






















 
 


















[
  {
    "key": "k0Cyw2gyT",
    "widget": "rate",
    "hidden": false,
    "option": {
      "count": 5,
      "allowHalf": false,
      "showText": false
    },
    "name": "count",
    "type": "number",
    "label": "评分",
    "description": "",
    "help": "",
    "disabled": false,
    "rules": [
      {
        "required": false,
        "message": "必填",
        "type": "number",
        "trigger": "change"
      }
    ]
  },
  {
    "key": "k0Cyw2g1T",
    "widget": "rate",
    "hidden": false,
    "option": {
      "count": 5,
      "allowHalf": true,
      "showText": false
    },
    "name": "count2",
    "type": "number",
    "label": "半选评分",
    "description": "",
    "help": "",
    "disabled": false,
    "rules": [
      {
        "required": false,
        "message": "必填",
        "type": "number",
        "trigger": "change"
      }
    ]
  },
  {
    "key": "k0xyw2g1T",
    "widget": "rate",
    "hidden": false,
    "option": {
      "count": 5,
      "allowHalf": false,
      "showText": true
    },
    "name": "count4",
    "type": "number",
    "label": "提示评分",
    "description": "",
    "help": "",
    "disabled": false,
    "rules": [
      {
        "required": false,
        "message": "必填",
        "type": "number",
        "trigger": "change"
      }
    ]
  }
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

# 规则配置

提示

必填时,评分必须大于0,非必填时评分可以为0

更新: 3/22/2021, 6:03:54 PM