@opensig/opendesign
Version:
162 lines (161 loc) • 3.65 kB
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const inInputProps = {
/**
* @zh-CN 输入框的值 v-model
* @en-US The value of the input box
*/
modelValue: {
type: String
},
/**
* @zh-CN 输入框的默认值,非受控
* @en-US The default value of the input box.Uncontrolled.
*/
defaultValue: {
type: String
},
/**
* @zh-CN 输入文本类型
* @en-US Input text type.
* @default 'text'
*/
type: {
type: String,
default: "text"
},
/**
* @zh-CN 提示文本
* @en-US Prompt text.
*/
placeholder: {
type: String
},
/**
* @zh-CN input id, 用于label关联
* @en-US Input id, used for label association.
*/
inputId: {
type: String
},
/**
* @zh-CN 是否禁用
* @en-US Whether to disable.
*/
disabled: {
type: Boolean
},
/**
* @zh-CN 是否只读
* @en-US Readonly.
*/
readonly: {
type: Boolean
},
/**
* @zh-CN 是否调起虚拟键盘
* @en-US Whether to invoke the virtual keyboard.
*/
noKeyboard: {
type: Boolean
},
/**
* @zh-CN 是否可以清除
* @en-US clearable.
*/
clearable: {
type: Boolean
},
/**
* @zh-CN 最小字符长度
* @en-US Minimum character length.
*/
minLength: {
type: Number
},
/**
* @zh-CN 最大字符长度
* @en-US Maximum character length.
*/
maxLength: {
type: Number
},
/**
* @zh-CN 是否显示字符长度信息,always: 一直显示; never:不显示;auto:设置了minLength、maxLength时显示
* @en-US if not show character length.
*/
showLength: {
type: [String, Function],
default: "auto"
},
/**
* @zh-CN 获取长度方法
* @en-US Method for getting length.
*/
getLength: {
type: Function
},
/**
* @zh-CN 超过最大字符长度时是否允许输入,当为false时,输入长度超出maxLength会被截断
* @en-US Whether input is allowed when the maximum character length is exceeded.
* @default true
*/
inputOnOutlimit: {
type: Boolean,
default: true
},
/**
* @zh-CN 对值格式化,控制显示格式
* @en-US Format the values and control the display format.
*/
format: {
type: Function
},
/**
* @zh-CN 判断值的有效性
* @en-US The validity of the judgement value.
*/
validate: {
type: Function
},
/**
* @zh-CN 输入为无效值时,在blur/pressEnter时的回调,返回值为纠正后的值;当输入值不合法时的处理方式:[true]:纠正为上一次合法的值(如果上一次合法值为空字符串,则不处理); [false|undefined]: 不处理;[function]: 使用函数的返回值
* @en-US When the input value is an invalid value, the callback during blur/pressEnter returns the corrected value.
*/
valueOnInvalidChange: {
type: [Boolean, Function]
},
/**
* @zh-CN 显示密码的方式
* @en-US The way to display the password.
* @default 'pointerdown'
*/
showPasswordEvent: {
type: String,
default: "pointerdown"
},
/**
* @zh-CN 是否自动适配内容宽度
* @en-US Whether the content width is automatically adapted.
*/
autoWidth: {
type: Boolean
},
/**
* @zh-CN 密码单个字符占位符
* @en-US A single-character placeholder for a password.
* @default '\u2022'
*/
passwordPlaceholder: {
type: String,
default: "•"
},
/**
* @zh-CN 是否限制仅数字输入
* @en-US Limit only numeric input.
*/
onlyNumericInput: {
type: Boolean
}
};
exports.inInputProps = inInputProps;