mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
[Improvement] Mixins: treat empty string as true for boolean props (#468)
This commit is contained in:
@@ -113,4 +113,16 @@ describe('Popup', () => {
|
||||
}, 300);
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('treat empty string as true for boolean props', () => {
|
||||
wrapper = mount(Popup, {
|
||||
propsData: {
|
||||
overlay: '',
|
||||
lockOnScroll: '',
|
||||
closeOnClickOverlay: ''
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper.vm.lockOnScroll).to.be.true;
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user