[bugfix] Field: label slot not work (#2872)

This commit is contained in:
neverland
2019-02-28 19:41:34 +08:00
committed by GitHub
parent 33e6f2265e
commit b99d7f9c06
3 changed files with 25 additions and 1 deletions

View File

@@ -163,3 +163,18 @@ test('clearable', () => {
expect(wrapper.emitted('input')[0][0]).toEqual('');
expect(wrapper.emitted('clear')).toBeTruthy();
});
test('render label slot', () => {
const wrapper = mount({
template: `
<field label="Default Label">
<template v-slot:label>Custom Label</template>
</field>
`,
components: {
Field
}
});
expect(wrapper).toMatchSnapshot();
});