dxy-wechat-share
丁香园前端微信分享组件
使用方法
1. 使用 npm 安装
安装
$ npm install dxy-wechat-share --save
使用
var dxy_wechat_share = ;;
<script>
直接引用
2. 通过 引用
使用
var dxy_wechat_share = ; // 此时 dxy_wechat_share 为全局变量;
API
;
options
:
-
debug
: Boolean, 启用debug模式, 默认为false -
title
: String, 分享显示的标题, 默认为页面title -
desc
: String, 分享显示的描述, 默认为页面title -
link
: String, 分享链接, 默认为当前链接 -
imgUrl
: String, 分享显示的图片 -
success
: Object, 分享成功回调函数 -
cancel
: Object, 取消分享回调函数
配置
配置信息API: 全局变量 window.wx_share