[new feature] Card: add bottom slot

This commit is contained in:
陈嘉涵
2019-05-30 11:00:59 +08:00
parent 6ab565920e
commit f87dac1d61
6 changed files with 32 additions and 1 deletions
@@ -1,5 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`render bottom slot 1`] = `
<div class="van-card">
<div class="van-card__header">
<div class="van-card__content">
<div class="van-card__bottom">
<div class="van-card__price">¥ 100</div>Custom Bottom
</div>
</div>
</div>
</div>
`;
exports[`render origin-price slot 1`] = `
<div class="van-card">
<div class="van-card__header">
+15
View File
@@ -15,3 +15,18 @@ test('render origin-price slot', () => {
expect(wrapper).toMatchSnapshot();
});
test('render bottom slot', () => {
const wrapper = mount({
template: `
<card :price="100">
<template v-slot:bottom>Custom Bottom</template>
</card>
`,
components: {
Card
}
});
expect(wrapper).toMatchSnapshot();
});