This commit is contained in:
2025-09-14 00:21:54 +08:00
commit d40b3bbd62
766 changed files with 36275 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
.button-share {
display: none;
}

View File

@@ -0,0 +1,17 @@
Page({
onShareAppMessage() {
return {
title: '转发按钮',
path: 'packageAPI/pages/share-button/share-button',
};
},
handleTapShareButton() {
if (!((typeof xhs.canIUse === 'function') && xhs.canIUse('button.open-type.share'))) {
xhs.showModal({
title: '当前版本不支持转发按钮',
content: '请升级至最新版本微信客户端',
showCancel: false,
});
}
},
});

View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "转发按钮"
}

View File

@@ -0,0 +1,14 @@
<view class="container">
<view class="page-body">
<view class="page-body-wrapper">
<text class="page-body-title">
轻触下方图标即可转发
</text>
<view class="page-body-line">
<button bindtap="handleTapShareButton" open-type="share" class="button-share" id="share-button">
</button>
<label for="share-button"><image style="width: 27px; height: 27px" src="/image/share.png" /></label>
</view>
</view>
</view>
</view>