feat(Popover): support config action color (#8049)

This commit is contained in:
neverland
2021-01-31 18:36:11 +08:00
committed by GitHub
parent 94b9e3981c
commit d27626ada2
5 changed files with 21 additions and 4 deletions
+14
View File
@@ -82,6 +82,20 @@ test('should allow to custom the className of action', () => {
expect(wrapper.find('.van-popover__action').html()).toMatchSnapshot();
});
test('should allow to custom the color of action test', () => {
const wrapper = mount(Popover, {
props: {
show: true,
teleport: null,
actions: [{ text: 'Option', color: 'red' }],
},
});
expect(wrapper.find('.van-popover__action').element.style.color).toEqual(
'red'
);
});
test('should locate to reference element when showed', async () => {
const root = document.createElement('div');
const wrapper = mount(Popover, {