feat(SidebarItem): add title slot (#7220)

This commit is contained in:
JSparow
2020-09-21 21:29:09 +08:00
committed by GitHub
parent f609c224b1
commit e201bc55ee
5 changed files with 41 additions and 1 deletions
+19
View File
@@ -76,3 +76,22 @@ test('without parent', () => {
expect(err).toBeTruthy();
}
});
test('title slot', () => {
const wrapper = mount({
template: `
<van-sidebar v-model="active">
<van-sidebar-item>
<template #title>Title Slot</template>
</van-sidebar-item>
</van-sidebar>
`,
data() {
return {
active: 0,
};
},
});
expect(wrapper).toMatchSnapshot();
});