mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[new feature] TreeSelect: add content slot (#4105)
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
Reference in New Issue
Block a user