UNPKG

element-plus

Version:

A Component Library for Vue 3

92 lines (91 loc) 2.43 kB
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const require_size = require("../../../constants/size.js"); const require_runtime = require("../../../utils/vue/props/runtime.js"); //#region ../../packages/components/form/src/form-item.ts const formItemValidateStates = [ "", "error", "validating", "success" ]; /** * @deprecated Removed after 3.0.0, Use `FormItemProps` instead. */ const formItemProps = require_runtime.buildProps({ /** * @description Label text. */ label: String, /** * @description Width of label, e.g. `'50px'`. `'auto'` is supported. */ labelWidth: { type: [String, Number] }, /** * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required. The default is extend from `form label-position`. */ labelPosition: { type: String, values: [ "left", "right", "top", "" ], default: "" }, /** * @description A key of `model`. It could be an array of property paths (e.g `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required. */ prop: { type: require_runtime.definePropType([String, Array]) }, /** * @description Whether the field is required or not, will be determined by validation rules if omitted. */ required: { type: Boolean, default: void 0 }, /** * @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). */ rules: { type: require_runtime.definePropType([Object, Array]) }, /** * @description Field error message, set its value and the field will validate error and show this message immediately. */ error: String, /** * @description Validation state of formItem. */ validateStatus: { type: String, values: formItemValidateStates }, /** * @description Same as for in native label. */ for: String, /** * @description Inline style validate message. */ inlineMessage: { type: Boolean, default: void 0 }, /** * @description Whether to show the error message. */ showMessage: { type: Boolean, default: true }, /** * @description Control the size of components in this form-item. */ size: { type: String, values: require_size.componentSizes } }); //#endregion exports.formItemProps = formItemProps; exports.formItemValidateStates = formItemValidateStates; //# sourceMappingURL=form-item.js.map