init
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.button-share {
|
||||
display: none;
|
||||
}
|
||||
17
xhs-mini-demos/component-case/share-button/share-button.js
Normal file
17
xhs-mini-demos/component-case/share-button/share-button.js
Normal 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,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "转发按钮"
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user