feat(GoodsActionIcon): add dot prop
This commit is contained in:
@@ -20,7 +20,7 @@ exports[`renders demo correctly 1`] = `
|
||||
<div class="van-goods-action">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon">
|
||||
<div class="van-icon van-icon-chat-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
<div class="van-info van-info--dot"></div>
|
||||
</div>客服
|
||||
</div>
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon">
|
||||
|
||||
@@ -18,6 +18,13 @@ exports[`Icon render icon slot 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Icon render icon slot with dot 1`] = `
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon">
|
||||
<div class="van-goods-action-icon__icon">Custom Icon<div class="van-info van-info--dot"></div>
|
||||
</div>Text
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Icon render icon slot with info 1`] = `
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon">
|
||||
<div class="van-goods-action-icon__icon">Custom Icon<div class="van-info">1</div>
|
||||
|
||||
@@ -66,3 +66,21 @@ test('Icon render icon slot with info', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('Icon render icon slot with dot', () => {
|
||||
const wrapper = mount({
|
||||
render(h) {
|
||||
return h(Icon, {
|
||||
props: {
|
||||
dot: true,
|
||||
},
|
||||
scopedSlots: {
|
||||
default: () => 'Text',
|
||||
icon: () => 'Custom Icon',
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user