diff --git a/components/form/formItem.vue b/components/form/formItem.vue index 06b71e55..980aa0d8 100644 --- a/components/form/formItem.vue +++ b/components/form/formItem.vue @@ -9,7 +9,7 @@ {{ label }} -
+
diff --git a/components/form/interface.ts b/components/form/interface.ts index 7388b4be..bc41954e 100644 --- a/components/form/interface.ts +++ b/components/form/interface.ts @@ -4,6 +4,7 @@ import { type ToRefs, type Ref, type ComponentObjectPropsOptions, + type CSSProperties, } from 'vue'; import { FORM_LAYOUT, LABEL_POSITION, FORM_ITEM_ALIGN } from './const'; import type { RuleItem, Rules } from 'async-validator'; @@ -40,12 +41,12 @@ export const formProps = { >, default: LABEL_POSITION.LEFT, }, + labelWidth: [String, Number] as PropType, + labelClass: String, showMessage: { type: Boolean, default: true, }, - labelWidth: [String, Number] as PropType, - labelClass: String, disabled: { type: Boolean, default: false, @@ -69,6 +70,14 @@ export const formItemProps = { label: String, labelWidth: [String, Number] as PropType, labelClass: String, + contentStyle: { + type: [String, Array, Object] as PropType< + string | CSSProperties[] | CSSProperties + >, + default() { + return {}; + }, + }, span: { type: Number, default: null as number, diff --git a/docs/.vitepress/components/form/basic.vue b/docs/.vitepress/components/form/basic.vue index 3c6169bd..f1ea6125 100644 --- a/docs/.vitepress/components/form/basic.vue +++ b/docs/.vitepress/components/form/basic.vue @@ -19,7 +19,7 @@ - + @@ -41,6 +41,15 @@ 61 - 65 + + + + + Submit