feat(Button): add loading slot (#6966)

This commit is contained in:
neverland
2020-08-09 08:10:44 +08:00
committed by GitHub
parent 3d8798ce3f
commit 927268cc25
5 changed files with 50 additions and 9 deletions
+13
View File
@@ -93,3 +93,16 @@ test('icon-prefix prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('loading slot', () => {
const wrapper = mount(Button, {
propsData: {
loading: true,
},
scopedSlots: {
loading: () => 'Custom Loading',
},
});
expect(wrapper).toMatchSnapshot();
});