数值步进器

查看源码

属性参考

注册名 data-controller="modify"
Targets
Values
Outlets

步进器:plus()/minus() 按 step value(默认取 input.step)增减 input target 并派发 change;submit value 为真时自动提交;total + quantity values 可同时计算可分配份数。

<div data-controller="modify" data-modify-step-value="1">
  <button data-action="click->modify#minus">-</button>
  <input data-modify-target="input" value="1">
  <button data-action="click->modify#plus">+</button>
</div>