feat(ImagePreview): add cover slot (#4766)
This commit is contained in:
@@ -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>
|
||||
`
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user