feat(Step): add finish-icon slot (#8241)
This commit is contained in:
@@ -63,6 +63,19 @@ exports[`should change inactive icon when using inactive-icon prop 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should render finish icon slot correctly 1`] = `
|
||||
<div class="van-hairline van-step van-step--horizontal van-step--finish">
|
||||
<div class="van-step__title">
|
||||
A
|
||||
</div>
|
||||
<div class="van-step__circle-container">
|
||||
Custim Fiinsh Icon
|
||||
</div>
|
||||
<div class="van-step__line">
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should render icon slot correctly 1`] = `
|
||||
<div class="van-steps van-steps--horizontal">
|
||||
<div class="van-steps__items">
|
||||
|
||||
@@ -90,3 +90,19 @@ test('should change finish icon when using finish-icon prop', () => {
|
||||
expect(firstStep.find('.van-icon-foo').exists()).toBeTruthy();
|
||||
expect(firstStep.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should render finish icon slot correctly', () => {
|
||||
const wrapper = mount({
|
||||
render() {
|
||||
return (
|
||||
<Steps active={1}>
|
||||
<Step v-slots={{ 'finish-icon': () => `Custim Fiinsh Icon` }}>A</Step>
|
||||
<Step>B</Step>
|
||||
</Steps>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
const firstStep = wrapper.find('.van-step');
|
||||
expect(firstStep.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user