Skip to content

Commit 84bf37a

Browse files
muronggjuzi214032
authored andcommitted
fix(Input): 修复组件切换显隐密码在 ios 下会清空问题
close #1079
1 parent 9813498 commit 84bf37a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/input/index.wxml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,25 @@
1313
</view>
1414
<!-- 小程序表单组件 -->
1515
<input
16+
wx:if="{{type !== 'password'}}"
1617
class="input {{hideLabel?'hideLabel':''}} l-input-class"
1718
value="{{ value }}"
1819
type="{{type}}"
19-
password="{{type==='password'}}"
20+
placeholder="{{placeholder}}"
21+
maxlength="{{maxlength}}"
22+
placeholder-class="pls-class"
23+
placeholder-style="{{placeholderStyle}}"
24+
disabled="{{disabled}}"
25+
focus="{{focus}}"
26+
bindinput="handleInputChange"
27+
bindfocus="handleInputFocus"
28+
bindblur="handleInputBlur"
29+
bindconfirm="handleInputConfirm" />
30+
<input
31+
wx:else
32+
class="input {{hideLabel?'hideLabel':''}} l-input-class"
33+
value="{{ value }}"
34+
password="{{true}}"
2035
placeholder="{{placeholder}}"
2136
maxlength="{{maxlength}}"
2237
placeholder-class="pls-class"

0 commit comments

Comments
 (0)