NumberBox 数字步进器
该组件用于输入数字,是c-input组件的扩展组件。
平台
| App | 小程序 | H5 |
|---|---|---|
| √ | √ | √ |
属性
| 属性名 | 类型 | 默认值 | 说明 | 平台 |
|---|---|---|---|---|
| modelValue | Number,String | null | All | |
| min | Number,String | 0 | 最小值 | All |
| max | Number,String | 9007199254740991 | 最大值 | All |
| step | Number,String | 1 | 步长 | All |
| decimal | Number,String | null | 允许的小数点长度 | All |
| disabled | Boolean | null | 禁用 | All |
| readonly | Boolean | null | 只读 | All |
| hideBtn | Boolean | false | 隐藏按钮 | All |
| minusBtnProps | Object | {} | 减按钮配置参考c-btn的props | All |
| addBtnProps | Object | {} | 加按钮配置参考c-btn的props | All |
| btnProps | Object | {} | 按钮样式默认配置 参考 c-btn的props | All |
| inputProps | Object | {} | 输入框样式配置 参考 c-input的props | All |
| initShowMin | Boolean | true | 初始化展示最小值 | All |
| cClass | String,Array,Object | null | 组件类 | All |
| cStyle | String,Array,Object | null | 组件样式 | All |
| margin | String,Number,Array | null | 外边距 | All |
| padding | String,Number,Array | null | 内边距 | All |
| bgColor | String | null | 背景色,支持c-bg-开头的背景色类 | All |
事件
| 事件名 | 说明 |
|---|---|
| update:modelValue | |
| change | value |
插槽
| 插槽名 | 说明 |
|---|---|
| minus | 减按钮 |
| add | 加按钮 |
示例
vue
<template>
<c-number-box />
</template>1
2
3
2
3
