Skip to content

Counter 计数器 ​

常用于数量跨度不大的选择性场景

基础 ​

类型 ​

默认

primary

禁用 ​

只读 ​

尺寸大小 ​

最大最小值 ​

步进 ​

精度 ​

Counter Props ​

参数介绍类型可选值默认值
value可通过 v-model 绑定Number—0
size尺寸Stringsmall-
disabled是否禁用Boolean—false
readonly是否只读Boolean—false
min最小值Number—0
max最大值Number—Infinity
step步进Number——
precision精度Number——
autofocus是否自动聚焦Boolean—false

Counter Events ​

名称介绍参数
change值改变时触发(value)
increase点击递增按钮时触发(value)
decrease点击递减按钮时触发(value)
focus在组件 Input 获得焦点时触发(event: Event)
blur在组件 Input 失去焦点时触发(event: Event)
disabled-click按钮禁用时点击触发(button: 'increase' | 'decrease')