请问下怎么做个按钮,按加号后显示减号,然后点击减号后删除,两个按钮变成一个的那种?
[图片]js不知道怎么写
<view class="selnum" >
<view data-item-index="{{index}}" class="cut" catchtap="cutNumber">-</view>
<input value="{{item.number}}" class="number" disabled="true" type="number" />
<view data-item-index="{{index}}" class="add" catchtap="addNumber" disabled='{{disabled}}'>+</view>
</view>