feat(TreeSelect): support show info (#4384)

This commit is contained in:
neverland
2019-09-06 10:46:08 +08:00
committed by GitHub
parent 5b0feb58e8
commit 4529bd6b30
5 changed files with 33 additions and 2 deletions
@@ -24,3 +24,13 @@ exports[`height prop 1`] = `
<div class="van-tree-select__content"></div>
</div>
`;
exports[`nav info 1`] = `
<div class="van-tree-select" style="height: 300px;">
<div class="van-sidebar van-tree-select__nav"><a class="van-sidebar-item van-sidebar-item--select van-tree-select__nav-item">
<div class="van-sidebar-item__text">group1<div class="van-info van-sidebar-item__info">3</div>
</div>
</a></div>
<div class="van-tree-select__content"></div>
</div>
`;
+15
View File
@@ -150,6 +150,21 @@ test('height prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('nav info', () => {
const wrapper = mount(TreeSelect, {
propsData: {
items: [
{
text: 'group1',
info: 3
}
]
}
});
expect(wrapper).toMatchSnapshot();
});
test('use sync modifier in main-active-index', () => {
const wrapper = mount({
template: `