ivue-material-plus
Version:
A high quality UI components Library with Vue.js
660 lines (659 loc) • 14.5 kB
TypeScript
import { PropType } from 'vue';
import type { Size } from './types/input';
declare const _sfc_main: import("vue").DefineComponent<{
/**
* 绑定的值,可使用 v-model 双向绑定
*
* @type {String | Number}
*/
modelValue: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 输入框类型
*
* @type {String}
*/
type: {
type: StringConstructor;
default: string;
};
/**
* 占位文本
*
* @type {String}
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* 原生的 spellcheck 属性
*
* @type {Boolean}
*/
spellcheck: {
type: BooleanConstructor;
default: boolean;
};
/**
* 设置输入框为禁用状态
*
* @type {Boolean}
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* 原生的自动完成功能
*
* @type {String}
*/
autocomplete: {
type: StringConstructor;
default: string;
};
/**
* 设置输入框为只读
*
* @type {Boolean}
*/
readonly: {
type: BooleanConstructor;
default: boolean;
};
/**
* 输入框name
*
* @type {String}
*/
name: {
type: StringConstructor;
};
/**
* 最大输入长度
*
* @type {Number}
*/
maxlength: {
type: NumberConstructor;
};
/**
* id
*
* @type {String}
*/
id: {
type: StringConstructor;
};
/**
* 自动获取焦点
*
* @type {Boolean}
*/
autofocus: {
type: BooleanConstructor;
default: boolean;
};
/**
* 只允许用户输入number
*
* @type {Boolean}
*/
number: {
type: BooleanConstructor;
default: boolean;
};
/**
* prepend前置内容背景颜色
*
* @type {String}
*/
prependBgColor: {
type: StringConstructor;
default: string;
};
/**
* append前后置内容背景颜色
*
* @type {String}
*/
appendBgColor: {
type: StringConstructor;
default: string;
};
/**
* 输入框头部图标
*
* @type {String}
*/
prefix: {
type: StringConstructor;
default: string;
};
/**
* 输入框尾部图标
*
* @type {String}
*/
suffix: {
type: StringConstructor;
default: string;
};
/**
* 输入框尺寸,可选值为large、small、default或者不设置
*
*
* @type {String}
*/
size: {
type: PropType<Size>;
validator(value: string): boolean;
default(): string;
};
/**
* 是否显示清除按钮
*
* @type {Boolean}
*/
clearable: {
type: BooleanConstructor;
default: boolean;
};
/**
* 输入框清除图标
*
* @type {String}
*/
clearIcon: {
type: StringConstructor;
default: string;
};
/**
* 是否显示输入字数统计,可以配合 maxlength 使用
*
* @type {Boolean}
*/
showWordLimit: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否显示切换密码图标
*
* @type {Boolean}
*/
password: {
type: BooleanConstructor;
default: boolean;
};
/**
* 密码图标
*
* @type {Object}
*/
passwordIcon: {
type: ObjectConstructor;
default: () => {
on: string;
off: string;
};
};
/**
* 是否显示为搜索型输入框
*
* @type {Boolean}
*/
search: {
type: BooleanConstructor;
default: boolean;
};
/**
* 开启 search 时可用,是否有确认按钮,可设为按钮文字
*
* @type {Boolean, String}
*/
enterButton: {
type: (BooleanConstructor | StringConstructor)[];
default: boolean;
};
/**
* 文本域默认行数,仅在 textarea 类型下有效
*
* @type {Number}
*/
rows: {
type: NumberConstructor;
default: number;
};
/**
* 自适应内容高度,仅在 textarea 类型下有效
* 指定最小行数和最大行数
*
* @type {Object}
*/
autoHeight: {
type: (BooleanConstructor | ObjectConstructor)[];
default: boolean;
};
/**
* 是否显示边框
*
* @type {Boolean}
*/
border: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否使用纯value
*
* @type {Boolean}
*/
isValue: {
type: BooleanConstructor;
default: boolean;
};
/**
* 原生的 wrap 属性,可选值为 hard 和 soft,仅在 textarea 下生效
*
* @type {String}
*/
wrap: {
validator(value: string): boolean;
default: string;
};
/**
* 自定义输入方法
*
* @type {Boolean}
*/
inputFunction: {
type: FunctionConstructor;
};
/**
* 输入时是否触发表单的校验
*
* @type {Boolean}
*/
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
}, {
prefixCls: string;
inputId: import("vue").Ref<string>;
inputDisabled: import("vue").ComputedRef<boolean>;
wrapClasses: import("vue").ComputedRef<(string | {
[x: string]: string | boolean;
})[]>;
contentClass: import("vue").ComputedRef<(string | {
[x: string]: string | boolean;
})[]>;
inputClass: import("vue").ComputedRef<(string | {
[x: string]: boolean;
})[]>;
textareaStyles: import("vue").Ref<{
height?: string;
minHeight?: string;
maxHeight?: string;
overflowY?: any;
}>;
textareaClasses: import("vue").ComputedRef<(string | {
[x: string]: boolean;
})[]>;
prependStyle: import("vue").ComputedRef<{}>;
prependColor: import("vue").ComputedRef<{}[]>;
appendColor: import("vue").ComputedRef<{}[]>;
appendStyle: import("vue").ComputedRef<{}>;
upperLimit: import("vue").ComputedRef<number>;
textLength: import("vue").ComputedRef<number>;
currentType: import("vue").ComputedRef<string>;
prepend: import("vue").ComputedRef<boolean>;
append: import("vue").ComputedRef<boolean>;
showPrefix: import("vue").ComputedRef<boolean>;
showSuffix: import("vue").ComputedRef<boolean>;
handleEnter: (event: Event) => void;
handleKeyup: (event: Event) => void;
handleKeypress: (event: Event) => void;
handleKeydown: (event: Event) => void;
handleFocus: (event: Event) => void;
handleBlur: (event: Event) => void;
handleInput: (event: Event) => void;
handleClear: () => void;
setCurrentValue: (value: string | number) => void;
handleShowPassword: () => boolean;
handleSuffix: (event: Event) => void;
handleSearch: () => boolean;
focus: (option: any) => void;
blur: () => void;
showPassword: import("vue").Ref<boolean>;
currentValue: import("vue").Ref<string | number>;
textarea: import("vue").Ref<HTMLTextAreaElement>;
input: import("vue").Ref<HTMLInputElement>;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("on-change" | "update:modelValue" | "on-focus" | "on-blur" | "on-clear" | "on-enter" | "on-keyup" | "on-keypress" | "on-keydown" | "on-suffix" | "on-search")[], "on-change" | "update:modelValue" | "on-focus" | "on-blur" | "on-clear" | "on-enter" | "on-keyup" | "on-keypress" | "on-keydown" | "on-suffix" | "on-search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 绑定的值,可使用 v-model 双向绑定
*
* @type {String | Number}
*/
modelValue: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 输入框类型
*
* @type {String}
*/
type: {
type: StringConstructor;
default: string;
};
/**
* 占位文本
*
* @type {String}
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* 原生的 spellcheck 属性
*
* @type {Boolean}
*/
spellcheck: {
type: BooleanConstructor;
default: boolean;
};
/**
* 设置输入框为禁用状态
*
* @type {Boolean}
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* 原生的自动完成功能
*
* @type {String}
*/
autocomplete: {
type: StringConstructor;
default: string;
};
/**
* 设置输入框为只读
*
* @type {Boolean}
*/
readonly: {
type: BooleanConstructor;
default: boolean;
};
/**
* 输入框name
*
* @type {String}
*/
name: {
type: StringConstructor;
};
/**
* 最大输入长度
*
* @type {Number}
*/
maxlength: {
type: NumberConstructor;
};
/**
* id
*
* @type {String}
*/
id: {
type: StringConstructor;
};
/**
* 自动获取焦点
*
* @type {Boolean}
*/
autofocus: {
type: BooleanConstructor;
default: boolean;
};
/**
* 只允许用户输入number
*
* @type {Boolean}
*/
number: {
type: BooleanConstructor;
default: boolean;
};
/**
* prepend前置内容背景颜色
*
* @type {String}
*/
prependBgColor: {
type: StringConstructor;
default: string;
};
/**
* append前后置内容背景颜色
*
* @type {String}
*/
appendBgColor: {
type: StringConstructor;
default: string;
};
/**
* 输入框头部图标
*
* @type {String}
*/
prefix: {
type: StringConstructor;
default: string;
};
/**
* 输入框尾部图标
*
* @type {String}
*/
suffix: {
type: StringConstructor;
default: string;
};
/**
* 输入框尺寸,可选值为large、small、default或者不设置
*
*
* @type {String}
*/
size: {
type: PropType<Size>;
validator(value: string): boolean;
default(): string;
};
/**
* 是否显示清除按钮
*
* @type {Boolean}
*/
clearable: {
type: BooleanConstructor;
default: boolean;
};
/**
* 输入框清除图标
*
* @type {String}
*/
clearIcon: {
type: StringConstructor;
default: string;
};
/**
* 是否显示输入字数统计,可以配合 maxlength 使用
*
* @type {Boolean}
*/
showWordLimit: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否显示切换密码图标
*
* @type {Boolean}
*/
password: {
type: BooleanConstructor;
default: boolean;
};
/**
* 密码图标
*
* @type {Object}
*/
passwordIcon: {
type: ObjectConstructor;
default: () => {
on: string;
off: string;
};
};
/**
* 是否显示为搜索型输入框
*
* @type {Boolean}
*/
search: {
type: BooleanConstructor;
default: boolean;
};
/**
* 开启 search 时可用,是否有确认按钮,可设为按钮文字
*
* @type {Boolean, String}
*/
enterButton: {
type: (BooleanConstructor | StringConstructor)[];
default: boolean;
};
/**
* 文本域默认行数,仅在 textarea 类型下有效
*
* @type {Number}
*/
rows: {
type: NumberConstructor;
default: number;
};
/**
* 自适应内容高度,仅在 textarea 类型下有效
* 指定最小行数和最大行数
*
* @type {Object}
*/
autoHeight: {
type: (BooleanConstructor | ObjectConstructor)[];
default: boolean;
};
/**
* 是否显示边框
*
* @type {Boolean}
*/
border: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否使用纯value
*
* @type {Boolean}
*/
isValue: {
type: BooleanConstructor;
default: boolean;
};
/**
* 原生的 wrap 属性,可选值为 hard 和 soft,仅在 textarea 下生效
*
* @type {String}
*/
wrap: {
validator(value: string): boolean;
default: string;
};
/**
* 自定义输入方法
*
* @type {Boolean}
*/
inputFunction: {
type: FunctionConstructor;
};
/**
* 输入时是否触发表单的校验
*
* @type {Boolean}
*/
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
}>> & {
"onOn-change"?: (...args: any[]) => any;
"onUpdate:modelValue"?: (...args: any[]) => any;
"onOn-focus"?: (...args: any[]) => any;
"onOn-blur"?: (...args: any[]) => any;
"onOn-clear"?: (...args: any[]) => any;
"onOn-enter"?: (...args: any[]) => any;
"onOn-keyup"?: (...args: any[]) => any;
"onOn-keypress"?: (...args: any[]) => any;
"onOn-keydown"?: (...args: any[]) => any;
"onOn-suffix"?: (...args: any[]) => any;
"onOn-search"?: (...args: any[]) => any;
}, {
number: boolean;
type: string;
modelValue: string | number;
placeholder: string;
spellcheck: boolean;
disabled: boolean;
autocomplete: string;
readonly: boolean;
autofocus: boolean;
prependBgColor: string;
appendBgColor: string;
prefix: string;
suffix: string;
size: Size;
clearable: boolean;
clearIcon: string;
showWordLimit: boolean;
password: boolean;
passwordIcon: Record<string, any>;
search: boolean;
enterButton: string | boolean;
rows: number;
autoHeight: boolean | Record<string, any>;
border: boolean;
isValue: boolean;
wrap: string;
validateEvent: boolean;
}>;
export default _sfc_main;