Open huangche007 opened 6 years ago
有npm包,vue-social-share。
@huangche007 将 css,js 引进 index.html, view 模板页 插入 dom 结构,
如 <div id="socialShare"</div>
vue mounted 钩子里调用,类似如下,
mounted() {
window.socialShare('#socialShare', {
// 这里配置各种参数
sites: ['weibo', 'wechat', 'twitter','google'],
mode: 'prepend',
url: this.$route.fullPath,
title:this.item.title ,
})
}
应用需要去微信等开发者网站上注册appid吗?
@flyingkang 肯定啊,这没得选。
最近在用Vuejs做个社区,需要用到分享功能,试了一下你的这个插件,发现实现不了分享功能