feat(Tab): add title-style prop (#5048)

This commit is contained in:
neverland
2019-11-19 20:49:10 +08:00
committed by GitHub
parent dbd0951b30
commit f8c130d0cb
7 changed files with 30 additions and 59 deletions
+12
View File
@@ -227,3 +227,15 @@ test('set name to zero', async () => {
tabs.at(1).trigger('click');
expect(onClick).toHaveBeenCalledWith(0, 'title2');
});
test('title-style prop', () => {
const wrapper = mount({
template: `
<van-tabs>
<van-tab title="title1" title-style="color: red;">Text</van-tab>
</van-tabs>
`
});
expect(wrapper.find('.van-tab').element.style.color).toEqual('red');
});