feat(DropdownItem): add title slot (#4975)

This commit is contained in:
neverland
2019-11-10 11:47:11 +08:00
committed by GitHub
parent 76cdb03962
commit 9d12e895fe
6 changed files with 45 additions and 2 deletions
+16
View File
@@ -241,3 +241,19 @@ test('toggle method', async done => {
}
});
});
test('title slot', () => {
const wrapper = mount({
template: `
<van-dropdown-menu>
<van-dropdown-item>
<template #title>
Custom Title
</template>
</van-dropdown-item>
</van-dropdown-menu>
`
});
expect(wrapper).toMatchSnapshot();
});