Skip to content

Commit b874df4

Browse files
committed
feat(Input): 新增 adjust-position 属性
1 parent fe0c512 commit b874df4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/input/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ Component({
7171
showEye: {
7272
type: Boolean,
7373
value: false
74+
},
75+
// 键盘弹起时,是否自动上推页面
76+
adjustPosition:{
77+
type: Boolean,
78+
value: true
7479
}
7580
},
7681

src/input/index.wxml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<!-- 小程序表单组件 -->
1515
<input
1616
wx:if="{{type !== 'password'}}"
17+
adjust-position="{{adjustPosition}}"
1718
class="input {{hideLabel?'hideLabel':''}} l-input-class"
1819
value="{{ value }}"
1920
type="{{type}}"
@@ -29,6 +30,7 @@
2930
bindconfirm="handleInputConfirm" />
3031
<input
3132
wx:else
33+
adjust-position="{{adjustPosition}}"
3234
class="input {{hideLabel?'hideLabel':''}} l-input-class"
3335
value="{{ value }}"
3436
password="{{true}}"

0 commit comments

Comments
 (0)