feat(SidebarItem): add title slot (#7220)
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user