Skip to content

Commit 75b0d80

Browse files
authored
Merge pull request #295 from F-loat/fix-share-func
fix: #206 页面默认分享的问题
2 parents 75b0d02 + 10388e7 commit 75b0d80

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/platforms/mp/runtime/lifecycle.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,8 @@ export function initMP (mpType, next) {
210210
},
211211

212212
// 用户点击右上角分享
213-
onShareAppMessage (options) {
214-
return callHook(rootVueVM, 'onShareAppMessage', options)
215-
},
213+
onShareAppMessage: rootVueVM.$options.onShareAppMessage
214+
? options => callHook(rootVueVM, 'onShareAppMessage', options) : null,
216215

217216
// Do something when page scroll
218217
onPageScroll (options) {

0 commit comments

Comments
 (0)