[new feature] Field: add password prop (#1583)

This commit is contained in:
neverland 2019-04-28 19:20:51 +08:00 committed by GitHub
parent 567c843d17
commit 223c6dd6f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -157,6 +157,7 @@ Page({
| readonly | 是否只读 | `Boolean` | `false` | | readonly | 是否只读 | `Boolean` | `false` |
| clearable | 是否启用清除控件 | `Boolean` | `false` | | clearable | 是否启用清除控件 | `Boolean` | `false` |
| required | 是否显示表单必填星号 | `Boolean` | `false` | | required | 是否显示表单必填星号 | `Boolean` | `false` |
| password | 是否是密码类型 | `Boolean` | `false` |
| title-width | 标题宽度 | `String` | `90px` | | title-width | 标题宽度 | `String` | `90px` |
| maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | `Number` | `-1` | | maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | `Number` | `-1` |
| placeholder | 输入框为空时占位符 | `String` | - | | placeholder | 输入框为空时占位符 | `String` | - |

View File

@ -20,21 +20,22 @@ VantComponent({
autosize: Boolean, autosize: Boolean,
readonly: Boolean, readonly: Boolean,
required: Boolean, required: Boolean,
password: Boolean,
iconClass: String, iconClass: String,
clearable: Boolean, clearable: Boolean,
inputAlign: String, inputAlign: String,
errorMessageAlign: String,
customClass: String, customClass: String,
customStyle: String,
confirmType: String, confirmType: String,
confirmHold: Boolean, confirmHold: Boolean,
errorMessage: String, errorMessage: String,
placeholder: String, placeholder: String,
customStyle: String, placeholderStyle: String,
errorMessageAlign: String,
showConfirmBar: { showConfirmBar: {
type: Boolean, type: Boolean,
value: true value: true
}, },
placeholderStyle: String,
adjustPosition: { adjustPosition: {
type: Boolean, type: Boolean,
value: true value: true

View File

@ -51,6 +51,7 @@
confirm-hold="{{ confirmHold }}" confirm-hold="{{ confirmHold }}"
cursor-spacing="{{ cursorSpacing }}" cursor-spacing="{{ cursorSpacing }}"
adjust-position="{{ adjustPosition }}" adjust-position="{{ adjustPosition }}"
password="{{ password || type === 'password' }}"
bindinput="onInput" bindinput="onInput"
bind:blur="onBlur" bind:blur="onBlur"
bind:focus="onFocus" bind:focus="onFocus"