feat(Uplaoder): add image-fit prop (#4189)

This commit is contained in:
neverland
2019-08-22 15:54:15 +08:00
committed by GitHub
parent cd8562176b
commit 5603da5c73
5 changed files with 37 additions and 2 deletions

View File

@@ -185,6 +185,19 @@ it('render preview image', async () => {
expect(wrapper).toMatchSnapshot();
});
it('image-fit prop', () => {
const wrapper = mount(Uploader, {
propsData: {
imageFit: 'contain',
fileList: [
{ url: 'https://img.yzcdn.cn/vant/cat.jpeg' }
]
}
});
expect(wrapper).toMatchSnapshot();
});
it('disable preview image', async () => {
const wrapper = mount(Uploader, {
propsData: {