You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.1 KiB
1 line
5.1 KiB
{"ast":null,"code":"import '../../../constants/index.mjs';\nimport '../../../utils/index.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { componentSizes } from '../../../constants/size.mjs';\nconst formItemValidateStates = [\"\", \"error\", \"validating\", \"success\"];\nconst formItemProps = buildProps({\n label: String,\n labelWidth: {\n type: [String, Number],\n default: \"\"\n },\n labelPosition: {\n type: String,\n values: [\"left\", \"right\", \"top\", \"\"],\n default: \"\"\n },\n prop: {\n type: definePropType([String, Array])\n },\n required: {\n type: Boolean,\n default: void 0\n },\n rules: {\n type: definePropType([Object, Array])\n },\n error: String,\n validateStatus: {\n type: String,\n values: formItemValidateStates\n },\n for: String,\n inlineMessage: {\n type: [String, Boolean],\n default: \"\"\n },\n showMessage: {\n type: Boolean,\n default: true\n },\n size: {\n type: String,\n values: componentSizes\n }\n});\nexport { formItemProps, formItemValidateStates };","map":{"version":3,"names":["formItemValidateStates","formItemProps","buildProps","label","String","labelWidth","type","Number","default","labelPosition","values","prop","definePropType","Array","required","Boolean","rules","Object","error","validateStatus","for","inlineMessage","showMessage","size","componentSizes"],"sources":["../../../../../../packages/components/form/src/form-item.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemRule } from './types'\n\nexport const formItemValidateStates = [\n '',\n 'error',\n 'validating',\n 'success',\n] as const\nexport type FormItemValidateState = typeof formItemValidateStates[number]\n\nexport type FormItemProp = Arrayable<string>\n\nexport const formItemProps = buildProps({\n /**\n * @description Label text.\n */\n label: String,\n /**\n * @description Width of label, e.g. `'50px'`. `'auto'` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required. The default is extend from `form label-position`.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top', ''],\n default: '',\n },\n /**\n * @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.\n */\n prop: {\n type: definePropType<FormItemProp>([String, Array]),\n },\n /**\n * @description Whether the field is required or not, will be determined by validation rules if omitted.\n */\n required: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator).\n */\n rules: {\n type: definePropType<Arrayable<FormItemRule>>([Object, Array]),\n },\n /**\n * @description Field error message, set its value and the field will validate error and show this message immediately.\n */\n error: String,\n /**\n * @description Validation state of formItem.\n */\n validateStatus: {\n type: String,\n values: formItemValidateStates,\n },\n /**\n * @description Same as for in native label.\n */\n for: String,\n /**\n * @description Inline style validate message.\n */\n inlineMessage: {\n type: [String, Boolean],\n default: '',\n },\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Control the size of components in this form-item.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\nexport type FormItemProps = ExtractPropTypes<typeof formItemProps>\n"],"mappings":";;;;AAEY,MAACA,sBAAsB,GAAG,CACpC,EAAE,EACF,OAAO,EACP,YAAY,EACZ,SAAS,CACX;AACY,MAACC,aAAa,GAAGC,UAAU,CAAC;EACtCC,KAAK,EAAEC,MAAM;EACbC,UAAU,EAAE;IACVC,IAAI,EAAE,CAACF,MAAM,EAAEG,MAAM,CAAC;IACtBC,OAAO,EAAE;EACb,CAAG;EACDC,aAAa,EAAE;IACbH,IAAI,EAAEF,MAAM;IACZM,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;IACpCF,OAAO,EAAE;EACb,CAAG;EACDG,IAAI,EAAE;IACJL,IAAI,EAAEM,cAAc,CAAC,CAACR,MAAM,EAAES,KAAK,CAAC;EACxC,CAAG;EACDC,QAAQ,EAAE;IACRR,IAAI,EAAES,OAAO;IACbP,OAAO,EAAE,KAAK;EAClB,CAAG;EACDQ,KAAK,EAAE;IACLV,IAAI,EAAEM,cAAc,CAAC,CAACK,MAAM,EAAEJ,KAAK,CAAC;EACxC,CAAG;EACDK,KAAK,EAAEd,MAAM;EACbe,cAAc,EAAE;IACdb,IAAI,EAAEF,MAAM;IACZM,MAAM,EAAEV;EACZ,CAAG;EACDoB,GAAG,EAAEhB,MAAM;EACXiB,aAAa,EAAE;IACbf,IAAI,EAAE,CAACF,MAAM,EAAEW,OAAO,CAAC;IACvBP,OAAO,EAAE;EACb,CAAG;EACDc,WAAW,EAAE;IACXhB,IAAI,EAAES,OAAO;IACbP,OAAO,EAAE;EACb,CAAG;EACDe,IAAI,EAAE;IACJjB,IAAI,EAAEF,MAAM;IACZM,MAAM,EAAEc;EACZ;AACA,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |