mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] Stepper: add input-width prop (#1480)
This commit is contained in:
parent
e90e58acb5
commit
34f34ba56b
@ -51,8 +51,9 @@
|
|||||||
| step | 步数 | `String | Number` | `1` |
|
| step | 步数 | `String | Number` | `1` |
|
||||||
| integer | 是否只允许输入整数 | `Boolean` | `false` |
|
| integer | 是否只允许输入整数 | `Boolean` | `false` |
|
||||||
| disabled | 是否禁用 | `Boolean` | `false` |
|
| disabled | 是否禁用 | `Boolean` | `false` |
|
||||||
| disable-input | 是否禁用input框 | `Boolean` | `false` |
|
| disable-input | 是否禁用输入框 | `Boolean` | `false` |
|
||||||
| async-change | 异步变更,为 `true` 时input值不变化,仅触发事件 | `Boolean` | `false` |
|
| async-change | 异步变更,为 `true` 时input值不变化,仅触发事件 | `Boolean` | `false` |
|
||||||
|
| input-width | 输入框宽度,须指定单位 | `String` | `30px` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ VantComponent({
|
|||||||
value: null,
|
value: null,
|
||||||
integer: Boolean,
|
integer: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
inputWidth: String,
|
||||||
asyncChange: Boolean,
|
asyncChange: Boolean,
|
||||||
disableInput: Boolean,
|
disableInput: Boolean,
|
||||||
min: {
|
min: {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<input
|
<input
|
||||||
type="{{ integer ? 'number' : 'digit' }}"
|
type="{{ integer ? 'number' : 'digit' }}"
|
||||||
class="input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}"
|
class="input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}"
|
||||||
|
style="{{ inputWidth ? 'width: ' + inputWidth : '' }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
focus="{{ focus }}"
|
focus="{{ focus }}"
|
||||||
disabled="{{ disabled || disableInput }}"
|
disabled="{{ disabled || disableInput }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user