ivue-material-plus
Version:
A high quality UI components Library with Vue.js
258 lines (257 loc) • 5.78 kB
TypeScript
import { FormValidateCallback, FormValidationResult } from './types/form';
import type { FormItemProp } from './types/form-item';
declare const _sfc_main: import("vue").DefineComponent<{
/**
* 表单域标签的位置
*
* @type {String}
*/
labelPosition: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 错误星号的位置
*
* @type {String}
*/
requireAsteriskPosition: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 表单域标签的后缀
*
* @type {String}
*/
labelSuffix: {
type: StringConstructor;
default: string;
};
/**
* 标签宽度
*
* @type {String | Number}
*/
labelWidth: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 行内表单模式
*
* @type {Boolean}
*/
inline: {
type: BooleanConstructor;
};
/**
* 表单数据对象
*
* @type {Object}
*/
model: {
type: ObjectConstructor;
};
/**
* 表单验证规则
*
* @type {Object}
*/
rules: {
type: ObjectConstructor;
};
/**
* 是否显示校验错误信息
*
* @type {Boolean}
*/
showMessage: {
type: BooleanConstructor;
default: boolean;
};
/**
* 验证成功提示状态
*
* @type {Boolean}
*/
showSuccessStatus: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否隐藏必填字段标签旁边的红色星号
*
* @type {Boolean}
*/
hideRequiredAsterisk: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否在 rules 属性改变后立即触发一次验证
*
* @type {Boolean}
*/
validateOnRuleChange: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否禁用该表单内的所有组件
*
* @type {Boolean}
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* 当校验失败时,滚动到第一个错误表单项
*
* @type {Boolean}
*/
scrollToError: {
type: BooleanConstructor;
};
}, {
wrapperClasses: import("vue").ComputedRef<(string | {
[x: string]: string | boolean;
})[]>;
validate: (callback?: FormValidateCallback) => FormValidationResult;
validateField: (props?: import("./types/form").Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult;
resetFields: (props?: import("./types/form").Arrayable<FormItemProp>) => void;
scrollToField: (prop: FormItemProp) => void;
clearValidate: (props?: import("./types/form").Arrayable<FormItemProp>) => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 表单域标签的位置
*
* @type {String}
*/
labelPosition: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 错误星号的位置
*
* @type {String}
*/
requireAsteriskPosition: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 表单域标签的后缀
*
* @type {String}
*/
labelSuffix: {
type: StringConstructor;
default: string;
};
/**
* 标签宽度
*
* @type {String | Number}
*/
labelWidth: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 行内表单模式
*
* @type {Boolean}
*/
inline: {
type: BooleanConstructor;
};
/**
* 表单数据对象
*
* @type {Object}
*/
model: {
type: ObjectConstructor;
};
/**
* 表单验证规则
*
* @type {Object}
*/
rules: {
type: ObjectConstructor;
};
/**
* 是否显示校验错误信息
*
* @type {Boolean}
*/
showMessage: {
type: BooleanConstructor;
default: boolean;
};
/**
* 验证成功提示状态
*
* @type {Boolean}
*/
showSuccessStatus: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否隐藏必填字段标签旁边的红色星号
*
* @type {Boolean}
*/
hideRequiredAsterisk: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否在 rules 属性改变后立即触发一次验证
*
* @type {Boolean}
*/
validateOnRuleChange: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否禁用该表单内的所有组件
*
* @type {Boolean}
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* 当校验失败时,滚动到第一个错误表单项
*
* @type {Boolean}
*/
scrollToError: {
type: BooleanConstructor;
};
}>>, {
disabled: boolean;
inline: boolean;
labelPosition: string;
requireAsteriskPosition: string;
labelSuffix: string;
labelWidth: string | number;
showMessage: boolean;
showSuccessStatus: boolean;
hideRequiredAsterisk: boolean;
validateOnRuleChange: boolean;
scrollToError: boolean;
}>;
export default _sfc_main;