feat(ShareSheet): add className option (#6886)
* feat: van-share-sheet支持设置分享选项的类名 * Update README.zh-CN.md * Update README.md * Update index.vue * fix: 添加一些van-share-sheet测试用例 * fix: change van-share-sheet test code Co-authored-by: neverland <416417567@163.com>
This commit is contained in:
@@ -29,6 +29,19 @@ test('description prop', () => {
|
||||
expect(wrapper.contains('.van-share-sheet__description')).toBeFalsy();
|
||||
});
|
||||
|
||||
test('option className', () => {
|
||||
const wrapper = mount(ShareSheet, {
|
||||
propsData: {
|
||||
value: true,
|
||||
options: [{ name: 'Link', icon: 'link', className: 'foo' }],
|
||||
},
|
||||
});
|
||||
|
||||
const option = wrapper.find('.van-share-sheet__option').element;
|
||||
|
||||
expect(option.className.includes('foo')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('select event', () => {
|
||||
const wrapper = mount(ShareSheet, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user