nui-app分享功能加传递的参数

288 阅读1分钟

点击button按钮实现分享,同样需要onShareAppMessage

<button open-type="share" :data-type='item.type' :data-id='item.id'></button>

注:如果需要带参数,data-后面加你声明的,例:data-id,在onShareAppMessage里面的res.target里面能找到传递的参数