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:
月光倾城
2020-07-28 10:59:30 +08:00
committed by GitHub
co-authored by neverland
parent 64bec01a73
commit d922c2baaa
4 changed files with 16 additions and 1 deletions
+13
View File
@@ -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: {