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
    },
}

参考:Ant-design-vue_InputNumber

value :Number

Props

成员说明类型默认值
autoFocus自动获取焦点booleanfalse
disabled禁用booleanfalse
formatter指定输入框展示值的格式function(value: number | string): string-
max最大值numberInfinity
min最小值number-Infinity
parser指定从 formatter 里转换回数字的方式,和 formatter 搭配使用function( string): number-
precision数值精度number-
decimalSeparator小数点string-
size输入框大小string
step每次改变步数,可以为小数number|string1

Events

事件名称说明回调参数
change变化回调Function(value: number | string)
pressEnter按下回车的回调function(e)