feat(Cascader): add color option (#8883)

This commit is contained in:
neverland
2021-06-18 09:39:00 +08:00
committed by GitHub
parent 5966689ce3
commit 305d73a087
4 changed files with 20 additions and 3 deletions
+12
View File
@@ -216,3 +216,15 @@ test('should allow to custom the className of option', async () => {
const option = wrapper.find('.van-cascader__option');
expect(option.classes()).toContain('foo');
});
test('should allow to custom the color of option', async () => {
const wrapper = mount(Cascader, {
props: {
options: [{ value: '1', text: 'foo', color: 'red' }],
},
});
await later();
const option = wrapper.find('.van-cascader__option');
expect(option.style.color).toEqual('red');
});