Skip to content

InputNumber 数字输入框

规则

js
{
    type: "InputNumber",
    field: "price",
    title: "价格",
    value: 1,
    props: {
        precision:2
    },
}
{
    type: "InputNumber",
    field: "price",
    title: "价格",
    value: 1,
    props: {
        precision:2
    },
}

参考:Element_InputNumber

value :Number

Props

参数说明类型可选值默认值
min设置计数器允许的最小值number-Infinity
max设置计数器允许的最大值numberInfinity
step计数器步长number1
precision数值精度number
size计数器尺寸stringlarge, small
disabled是否禁用计数器booleanfalse
controls是否使用控制按钮booleantrue
controlsPosition控制按钮位置stringright-
name原生属性string
label输入框关联的label文字string
placeholder输入框默认 placeholderstring--

Events

事件名称说明回调参数
change绑定值被改变时触发最后变更的值
blur在组件 Input 失去焦点时触发(event: Event)
focus在组件 Input 获得焦点时触发(event: Event)

Released under the MIT License.