feat(Field): add name prop

This commit is contained in:
陈嘉涵
2020-02-07 14:33:44 +08:00
parent 03c826c4d4
commit 67bec61c6d
5 changed files with 23 additions and 2 deletions
@@ -53,6 +53,14 @@ exports[`label-width prop without unit 1`] = `
</div>
`;
exports[`name prop 1`] = `
<div class="van-cell van-field">
<div class="van-cell__value van-cell__value--alone">
<div class="van-field__body"><input type="text" name="foo" class="van-field__control"></div>
</div>
</div>
`;
exports[`reach max word-limit 1`] = `
<div class="van-cell van-field">
<div class="van-cell__value van-cell__value--alone">
+9
View File
@@ -291,3 +291,12 @@ test('reach max word-limit', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('name prop', () => {
const wrapper = mount(Field, {
propsData: {
name: 'foo',
},
});
expect(wrapper).toMatchSnapshot();
});