思路:
我研究最简单的方法就是外层加一个标签,用catchtap去阻止
关键代码
html:
<view catchtap="stepper">
<van-stepper value="{{ item.amount }}" long-press="{{ false }}" data-index='{{index}}'
data-item='{{item}}' input-width="30px" button-size="20px" min="1" integer max="9999"
bind:change="amountChange" plus-class="num-icon" minus-class="num-icon"
input-class="num-input" />
</view>
js:
// 阻止加减按钮冒泡
stepper() {
//什么也不做
},
网友评论