feat(Cascader): add close-icon prop (#8334)

This commit is contained in:
neverland
2021-03-14 11:20:08 +08:00
committed by GitHub
parent 393d7cb7af
commit c424d6efcd
6 changed files with 26 additions and 2 deletions
+9
View File
@@ -70,6 +70,15 @@ test('should not render close icon when closeable is false', () => {
expect(wrapper.find('.van-cascader__close-icon').exists()).toBeFalsy();
});
test('should change close icon when using close-icon prop', () => {
const wrapper = mount(Cascader, {
props: {
closeIcon: 'success',
},
});
expect(wrapper.find('.van-cascader__close-icon').html()).toMatchSnapshot();
});
test('should render title slot correctly', () => {
const wrapper = mount(Cascader, {
slots: {