feat(ImagePreview): add cover slot (#4766)

This commit is contained in:
neverland
2019-10-18 10:30:19 +08:00
committed by GitHub
parent 321905a4b7
commit dc964ac068
6 changed files with 44 additions and 6 deletions
+13 -1
View File
@@ -151,7 +151,19 @@ test('index slot', () => {
const wrapper = mount({
template: `
<van-image-preview :value="true">
<template v-slot:index>Custom Index</template>
<template #index>Custom Index</template>
</van-image-preview>
`
});
expect(wrapper).toMatchSnapshot();
});
test('cover slot', () => {
const wrapper = mount({
template: `
<van-image-preview :value="true">
<template #cover>Custom Cover Content</template>
</van-image-preview>
`
});