mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
数量选择器添加小号样式
This commit is contained in:
parent
29eb1276ac
commit
ed112e6cc3
2
dist/quantity/index.wxml
vendored
2
dist/quantity/index.wxml
vendored
@ -1,5 +1,5 @@
|
||||
<template name="zui-quantity">
|
||||
<view class="zui-quantity">
|
||||
<view class="zui-quantity {{ size === 'small' ? 'zui-quantity--small' : '' }}">
|
||||
<view
|
||||
class="zui-quantity__minus {{ quantity <= min ? 'zui-quantity--disabled' : '' }}"
|
||||
data-component-id="{{ componentId }}"
|
||||
|
9
dist/quantity/index.wxss
vendored
9
dist/quantity/index.wxss
vendored
@ -35,3 +35,12 @@
|
||||
color: #bbb;
|
||||
border-color: #e8e8e8;
|
||||
}
|
||||
.zui-quantity--small view {
|
||||
min-width: 36px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.zui-quantity--small .zui-quantity__text {
|
||||
width: 36px;
|
||||
line-height: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ var ZUI = require('../../dist/index');
|
||||
Page(Object.assign({}, ZUI.Quantity, {
|
||||
data: {
|
||||
quantity1: {
|
||||
quantity: 1,
|
||||
quantity: 10,
|
||||
min: 1,
|
||||
max: 20
|
||||
},
|
||||
@ -11,6 +11,11 @@ Page(Object.assign({}, ZUI.Quantity, {
|
||||
quantity: 1,
|
||||
min: 1,
|
||||
max: 1
|
||||
},
|
||||
quantity3: {
|
||||
quantity: 10,
|
||||
min: 1,
|
||||
max: 20
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -4,7 +4,14 @@
|
||||
<view style="padding: 40px 15px">
|
||||
<template is="zui-quantity" data="{{ ...quantity1, componentId: 'quantity1' }}" />
|
||||
</view>
|
||||
|
||||
<!-- 当最大值等于最小值时,组件不可用 -->
|
||||
<view style="padding: 40px 15px ">
|
||||
<template is="zui-quantity" data="{{ ...quantity2, componentId: 'quantity2' }}" />
|
||||
</view>
|
||||
|
||||
<!-- small size -->
|
||||
<view style="padding: 40px 15px ">
|
||||
<template is="zui-quantity" data="{{ ...quantity3, componentId: 'quantity3', size: 'small' }}" />
|
||||
</view>
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user