dxy-share
丁香园前端分享组件
Demo
使用方法
1. 使用 npm 安装
安装
$ npm install dxy-share --save
使用
JS:
var dxy_share = ;var share = ;share;
CSS:
;
<script>
直接引用
2. 通过 引用
<!--...-->
使用
var share = ; // 此时 dxy_share 为全局变量share;
API
var share = ;share;
options
:
-
id
: String, 放置分享组件的容器id -
lst
: Array, 需要显示的分享项, 现有:['sina', 'weixin', 'qzone', 'douban', 'idxy', 'renren']
-
style
: 组件的主题,现有:1, 2, 3, 4, 5, 6, 7, 'm1'
-
addTo
: String, 追加在自动生成内容(网页title) 后的文本 -
share_txt
: String, 自定义分享的文本内容, 默认为页面title -
da
: Boolean, 是否启用打点, 默认为 false