feat(Popover): add icon-prefix prop (#8703)
* fix: popover 增加 icon-prefix 属性 * fix: popover icon-prefix属性跑单测 Co-authored-by: 冷开俊 <lengkj@travelsky.com.cn>
This commit is contained in:
@@ -10,6 +10,11 @@ exports[`should allow to custom the className of action 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should change icon class prefix when using icon-prefix prop 1`] = `
|
||||
<span class="van-popover__wrapper">
|
||||
</span>
|
||||
`;
|
||||
|
||||
exports[`should locate to reference element when showed 1`] = `
|
||||
<transition-stub>
|
||||
</transition-stub>
|
||||
|
||||
@@ -187,3 +187,15 @@ test('should not close Popover when outside is clicked and close-on-click-outsid
|
||||
trigger(document.body, 'touchstart');
|
||||
expect(wrapper.emitted('update:show')).toBeFalsy();
|
||||
});
|
||||
|
||||
test('should change icon class prefix when using icon-prefix prop', () => {
|
||||
const wrapper = mount(Popover, {
|
||||
props: {
|
||||
show: true,
|
||||
icon: 'success',
|
||||
iconPrefix: 'my-icon',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user