feat(Stepper): improve number keyboard

This commit is contained in:
chenjiahan 2020-03-11 09:55:04 +08:00
parent b983ac0891
commit 58e74a9e8b

View File

@ -293,6 +293,10 @@ export default createComponent({
type="number"
role="spinbutton"
class={bem('input')}
// set keyboard in mordern browers
inputmode={this.integer ? 'numeric' : 'decimal'}
// set keyboard in iOS 8 ~ 12
pattern={this.integer ? '\\d*' : null}
value={this.currentValue}
style={this.inputStyle}
disabled={this.disabled}