feat(Cascader): add color option (#8883)
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user