# inputNumber

# Schema类静态属性

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

{
  widget: 'inputNumber',
  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

{
  min: 0,       // 最小值
  max: 100,     // 最大值
  step: 1,      // 步长,每次增加的值大小
  precision: 2  // 精度,小数点位数
}
1
2
3
4
5
6

TIP

inputNumber 规则部分只有是否必填

# 示例展示

  • schema
{
  "key": "kSXVjrpy7",
  "widget": "inputNumber",
  "hidden": false,
  "option": {
    "min": 0,
    "max": 10,
    "step": 1,
    "precision": 2
  },
  "name": "price",
  "type": "string",
  "label": "数字",
  "description": "",
  "help": "",
  "disabled": false,
  "rules": [
    {
      "required": false,
      "message": "必填",
      "type": "number",
      "trigger": "blur"
    }
  ],
  "placeholder": "请输入..."
}
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
更新: 3/22/2021, 6:03:54 PM