[new feature] Field: add label-width prop (#3235)

This commit is contained in:
neverland
2019-04-29 11:31:52 +08:00
committed by GitHub
parent 0b774ed7c0
commit 9fe0831e6d
5 changed files with 55 additions and 1 deletions
+20
View File
@@ -196,3 +196,23 @@ test('size prop', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('label-width prop with unit', () => {
const wrapper = mount(Field, {
propsData: {
label: 'Label',
labelWidth: '10rem'
}
});
expect(wrapper).toMatchSnapshot();
});
test('label-width prop without unit', () => {
const wrapper = mount(Field, {
propsData: {
label: 'Label',
labelWidth: 100
}
});
expect(wrapper).toMatchSnapshot();
});