mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feature] Stepper: support number type of input-width prop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { use, isDef } from '../utils';
|
||||
import { use, isDef, suffixPx } from '../utils';
|
||||
|
||||
const [sfc, bem] = use('stepper');
|
||||
|
||||
@@ -7,7 +7,7 @@ export default sfc({
|
||||
value: null,
|
||||
integer: Boolean,
|
||||
disabled: Boolean,
|
||||
inputWidth: String,
|
||||
inputWidth: [String, Number],
|
||||
asyncChange: Boolean,
|
||||
disableInput: Boolean,
|
||||
min: {
|
||||
@@ -143,7 +143,7 @@ export default sfc({
|
||||
aria-valuemin={this.min}
|
||||
aria-valuenow={this.currentValue}
|
||||
disabled={this.disabled || this.disableInput}
|
||||
style={{ width: this.inputWidth }}
|
||||
style={{ width: suffixPx(this.inputWidth) }}
|
||||
onInput={this.onInput}
|
||||
onFocus={this.onFocus}
|
||||
onBlur={this.onBlur}
|
||||
|
Reference in New Issue
Block a user