Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:(share-sheet):openType为share时,增加字段,以便区分到底是点的哪一个分享按钮 #5651

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/share-sheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Page({
| description | 分享选项描述 | _string_ |
| icon | 图标,可选值为 `qq` `link` `weibo` `wechat` `poster` `qrcode` `weapp-qrcode` `wechat-moments`,支持传入图片 URL | _string_ |
| openType | 按钮 `open-type`,可用于实现分享功能,可选值为 `share` | _string_ |

| shareName | 按钮 `open-type`为`share`时可传入此参数用于区分具体点击项,| _string_ |
lukesyy marked this conversation as resolved.
Show resolved Hide resolved
### Events

| 事件名 | 说明 | 回调参数 |
Expand Down
2 changes: 1 addition & 1 deletion packages/share-sheet/options.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
data-index="{{ index }}"
bindtap="onSelect"
>
<button class="van-share-sheet__button" open-type="{{ item.openType }}">
<button class="van-share-sheet__button" open-type="{{ item.openType }}" data-name="{{item.shareName}}">
<image src="{{ computed.getIconURL(item.icon) }}" class="van-share-sheet__icon" />
<view wx:if="{{ item.name }}" class="van-share-sheet__name">{{ item.name }}</view>
<view wx:if="{{ item.description }}" class="van-share-sheet__option-description">
Expand Down