[new feature] Uploader: add max-count prop

This commit is contained in:
陈嘉涵
2019-06-04 15:53:19 +08:00
parent 03af04e81e
commit 47bb6fc7fa
8 changed files with 98 additions and 11 deletions

View File

@@ -136,3 +136,17 @@ it('render preview image', async () => {
expect(wrapper).toMatchSnapshot();
});
it('max-count prop', async () => {
const wrapper = mount(Uploader, {
propsData: {
preview: true,
maxCount: 1
}
});
wrapper.vm.onChange(multiFile);
await later();
expect(wrapper).toMatchSnapshot();
});