Skip to content

Commit

Permalink
feat(Input): 新增 adjust-position 属性
Browse files Browse the repository at this point in the history
  • Loading branch information
juzi214032 committed Feb 23, 2021
1 parent fe0c512 commit b874df4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Component({
showEye: {
type: Boolean,
value: false
},
// 键盘弹起时,是否自动上推页面
adjustPosition:{
type: Boolean,
value: true
}
},

Expand Down
2 changes: 2 additions & 0 deletions src/input/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<!-- 小程序表单组件 -->
<input
wx:if="{{type !== 'password'}}"
adjust-position="{{adjustPosition}}"
class="input {{hideLabel?'hideLabel':''}} l-input-class"
value="{{ value }}"
type="{{type}}"
Expand All @@ -29,6 +30,7 @@
bindconfirm="handleInputConfirm" />
<input
wx:else
adjust-position="{{adjustPosition}}"
class="input {{hideLabel?'hideLabel':''}} l-input-class"
value="{{ value }}"
password="{{true}}"
Expand Down

0 comments on commit b874df4

Please sign in to comment.