# gg-input-password 输入框
gg-input-password
密码输入框,一般和表单配合使用,默认为实心白色背景。
在 script
中引用组件
若使用uni-app的
easycom
引入方式,则无需在script
中重复引用
import ggInputPassword from '@/components/gg-input-password/gg-input-password.vue'
export default {
components: {ggInputPassword}
}
1
2
3
4
2
3
4
在 template
中使用组件
# 密码输入
<gg-input-password label="密码" v-model="formData.password" />
1
- @type 属性为
text
且 @password属性为true
的input - @description 本组件一般用于隐藏密码内容的输入框
# 属性说明
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
placeholder | String | - | 占位符 |
must | Boolen | false | 是否必填 |
disabled | Boolen | false | 是否禁止 |
label | String | - | 字段名 |
v-model | String | - | 数据双向绑定 |
maxlength | Number | -1 | 输入长度限制 |
labelWidth | Number | 60 | 字段区域宽度,上下排列无效 |
layout | String | row | 排列方式 ['row','col'] |
message | String | - | 错误提示 |
messageDisplay | Boolen | false | 错误提示是否显示 |
tip | String | - | 字段提示/说明 |
rtip | String | - | 输入框右侧占位提示 |
onQClear | Boolean | false | 是否显示一键清空按钮 |