feat(TreeSelect): add selected-icon prop (#6615)

This commit is contained in:
neverland
2020-06-26 21:19:19 +08:00
committed by GitHub
parent c93319a4c0
commit 5486e82b41
5 changed files with 27 additions and 2 deletions
+13
View File
@@ -330,3 +330,16 @@ test('should sync value before trigger click-item event', (done) => {
const items = wrapper.findAll('.van-tree-select__item');
items.at(1).trigger('click');
});
test('selected-icon prop', () => {
const wrapper = mount(TreeSelect, {
propsData: {
items: mockItems,
activeId: 1,
mainActiveIndex: 0,
selectedIcon: 'foo',
},
});
expect(wrapper.find('.van-tree-select__item')).toMatchSnapshot();
});