share.js icon indicating copy to clipboard operation
share.js copied to clipboard

单页应用该怎么使用?

Open huangche007 opened this issue 8 years ago • 4 comments

最近在用Vuejs做个社区,需要用到分享功能,试了一下你的这个插件,发现实现不了分享功能

huangche007 avatar Oct 24 '17 05:10 huangche007

有npm包,vue-social-share。

qiqihaobenben avatar Oct 31 '17 03:10 qiqihaobenben

@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 ,
      })
}

paddingme avatar Nov 04 '17 15:11 paddingme

应用需要去微信等开发者网站上注册appid吗?

flyingkang avatar Apr 24 '18 10:04 flyingkang

@flyingkang 肯定啊,这没得选。

overtrue avatar Apr 24 '18 10:04 overtrue