mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
* add src dir && add build * add build watch && change dir name * bower ignore package.json
29 lines
1015 B
Plaintext
29 lines
1015 B
Plaintext
<template name="zan-quantity">
|
|
<view class="zan-quantity {{ size === 'small' ? 'zan-quantity--small' : '' }}">
|
|
<view
|
|
class="zan-quantity__minus {{ quantity <= min ? 'zan-quantity--disabled' : '' }}"
|
|
data-component-id="{{ componentId }}"
|
|
data-quantity="{{ quantity }}"
|
|
data-disabled="{{ quantity <= min }}"
|
|
bindtap="_handleZanQuantityMinus"
|
|
>-</view>
|
|
<input
|
|
class="zan-quantity__text {{ min >= max ? 'zan-quantity--disabled' : '' }}"
|
|
type="number"
|
|
data-component-id="{{ componentId }}"
|
|
data-min="{{ min }}"
|
|
data-max="{{ max }}"
|
|
value="{{ quantity }}"
|
|
disabled="{{ min >= max }}"
|
|
bindblur="_handleZanQuantityBlur"
|
|
></input>
|
|
<view
|
|
class="zan-quantity__plus {{ quantity >= max ? 'zan-quantity--disabled' : '' }}"
|
|
data-component-id="{{ componentId }}"
|
|
data-quantity="{{ quantity }}"
|
|
data-disabled="{{ quantity >= max }}"
|
|
bindtap="_handleZanQuantityPlus"
|
|
>+</view>
|
|
</view>
|
|
</template>
|