[new feature] TreeSelect: add content slot (#4105)

This commit is contained in:
neverland
2019-08-12 19:15:11 +08:00
committed by GitHub
parent 6413cd1996
commit 317b115da8
5 changed files with 102 additions and 54 deletions

View File

@@ -124,3 +124,20 @@ test('click disabled item', () => {
items.at(0).trigger('click');
expect(onClickItem).toHaveBeenCalledTimes(0);
});
test('content slot', () => {
const wrapper = mount(TreeSelect, {
propsData: {
items: [
{
text: 'group1'
}
]
},
scopedSlots: {
content: () => 'Custom Content'
}
});
expect(wrapper).toMatchSnapshot();
});