mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [form] label-position props default value (#7838)
This commit is contained in:
@@ -210,6 +210,14 @@ describe('Form', () => {
|
||||
<Input v-model={form.address} />
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Form model={form} ref="labelRight">
|
||||
<FormItem>
|
||||
<Input v-model={form.name} />
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Input v-model={form.address} />
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
@@ -220,6 +228,9 @@ describe('Form', () => {
|
||||
expect(wrapper.findComponent({ ref: 'labelLeft' }).classes()).toContain(
|
||||
'el-form--label-left'
|
||||
)
|
||||
expect(wrapper.findComponent({ ref: 'labelRight' }).classes()).toContain(
|
||||
'el-form--label-right'
|
||||
)
|
||||
})
|
||||
|
||||
it('label size', () => {
|
||||
|
||||
@@ -16,7 +16,11 @@ export const formProps = buildProps({
|
||||
rules: {
|
||||
type: definePropType<FormRules>(Object),
|
||||
},
|
||||
labelPosition: String,
|
||||
labelPosition: {
|
||||
type: String,
|
||||
values: ['left', 'right', 'top'] as const,
|
||||
default: 'right',
|
||||
},
|
||||
labelWidth: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
|
||||
Reference in New Issue
Block a user