feat(Form): add colon prop
This commit is contained in:
@@ -1,5 +1,22 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`colon prop 1`] = `
|
||||
<form class="van-form">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>Label:</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body"><input type="text" class="van-field__control"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label">Custom Label:</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body"><input type="text" class="van-field__control"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
`;
|
||||
|
||||
exports[`error-message-align prop 1`] = `
|
||||
<form class="van-form">
|
||||
<div class="van-cell van-field">
|
||||
|
||||
@@ -105,6 +105,20 @@ test('validate-first prop', async () => {
|
||||
expect(onSubmit).toHaveBeenCalledWith({ A: 'foo', B: 'foo' });
|
||||
});
|
||||
|
||||
test('colon prop', () => {
|
||||
const wrapper = mountForm({
|
||||
template: `
|
||||
<van-form colon>
|
||||
<van-field label="Label" />
|
||||
<van-field>
|
||||
<template #label>Custom Label</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
`,
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('label-align prop', () => {
|
||||
const wrapper = mountForm({
|
||||
template: `
|
||||
|
||||
Reference in New Issue
Block a user