Merge branch 'dev' into next

This commit is contained in:
chenjiahan
2020-08-31 11:24:31 +08:00
5 changed files with 60 additions and 29 deletions
@@ -24,6 +24,12 @@ exports[`description prop 1`] = `
</div>
`;
exports[`description slot 1`] = `
<div class="van-popup van-popup--round van-popup--bottom van-popup--safe-area-inset-bottom van-action-sheet" name="van-popup-slide-bottom">
<div class="van-action-sheet__description">Custom Description</div><button type="button" class="van-action-sheet__item"><span class="van-action-sheet__name">Option</span></button>
</div>
`;
exports[`disable lazy-render 1`] = `
<div class="van-popup van-popup--round van-popup--bottom van-popup--safe-area-inset-bottom van-action-sheet" style="display: none;" name="van-popup-slide-bottom"><button type="button" class="van-action-sheet__item"><span class="van-action-sheet__name">Option</span></button><button type="button" class="van-action-sheet__item"><span class="van-action-sheet__name">Option</span></button>
<div class="van-action-sheet__gap"></div><button type="button" class="van-action-sheet__cancel">Cancel</button>
+14
View File
@@ -173,6 +173,20 @@ test('description prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('description slot', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
actions: [{ name: 'Option' }],
},
scopedSlots: {
description: () => 'Custom Description',
},
});
expect(wrapper).toMatchSnapshot();
});
test('close-icon prop', () => {
const wrapper = mount(ActionSheet, {
propsData: {