feat(Area): add columns-top、columns-bottom prop (#5719)

This commit is contained in:
chenjiahan
2020-02-25 19:25:20 +08:00
parent 7344389535
commit 064cff6fe0
6 changed files with 43 additions and 1 deletions
@@ -114,6 +114,26 @@ exports[`columns-num prop 1`] = `
</div>
`;
exports[`columns-top、columns-bottom slot 1`] = `
<div class="van-picker van-area">
<div class="van-hairline--top-bottom van-picker__toolbar"><button type="button" class="van-picker__cancel">取消</button><button type="button" class="van-picker__confirm">确认</button></div>
<!---->Top<div class="van-picker__columns" style="height: 220px;">
<div class="van-picker-column">
<ul class="van-picker-column__wrapper" style="transform: translate3d(0, 88px, 0); transition-duration: 0ms; transition-property: none; line-height: 44px;"></ul>
</div>
<div class="van-picker-column">
<ul class="van-picker-column__wrapper" style="transform: translate3d(0, 88px, 0); transition-duration: 0ms; transition-property: none; line-height: 44px;"></ul>
</div>
<div class="van-picker-column">
<ul class="van-picker-column__wrapper" style="transform: translate3d(0, 88px, 0); transition-duration: 0ms; transition-property: none; line-height: 44px;"></ul>
</div>
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
<div class="van-hairline-unset--top-bottom van-picker__frame" style="height: 44px;"></div>
</div>Bottom
<!---->
</div>
`;
exports[`reset method 1`] = `
<div class="van-picker van-area">
<div class="van-hairline--top-bottom van-picker__toolbar"><button type="button" class="van-picker__cancel">取消</button><button type="button" class="van-picker__confirm">确认</button></div>
+12
View File
@@ -139,3 +139,15 @@ test('title slot', async () => {
await later();
expect(wrapper).toMatchSnapshot();
});
test('columns-top、columns-bottom slot', async () => {
const wrapper = mount(Area, {
slots: {
'columns-top': 'Top',
'columns-bottom': 'Bottom',
},
});
await later();
expect(wrapper).toMatchSnapshot();
});