Skip to content

Commit 26c9f1d

Browse files
author
xueyuan
committed
fix(input): 优化 inputmode 属性的处理逻辑
1 parent cd18846 commit 26c9f1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/varlet-ui/src/input/Input.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
:maxlength="maxlength"
6464
:rows="rows"
6565
:enterkeyhint="enterkeyhint"
66-
:inputmode="inputmode"
66+
:inputmode="inputmode != null ? inputmode : type === 'number' ? 'decimal' : undefined"
6767
:style="{
6868
color: !errorMessage ? textColor : undefined,
6969
caretColor: !errorMessage ? focusColor : undefined,
@@ -98,7 +98,7 @@
9898
:placeholder="!hint ? placeholder : undefined"
9999
:maxlength="maxlength"
100100
:enterkeyhint="enterkeyhint"
101-
:inputmode="inputmode"
101+
:inputmode="inputmode != null ? inputmode : type === 'number' ? 'decimal' : undefined"
102102
:style="{
103103
color: !errorMessage ? textColor : undefined,
104104
caretColor: !errorMessage ? focusColor : undefined,

0 commit comments

Comments
 (0)