在VUE中使用vue-social-share及問題


原文鏈接:GitHub地址https://github.com/sinchang/vue-social-share

1.安裝:

npm install vue-social-share -S

2.使用:

 

 3.常用的屬性:

url                 : '', // 網址,默認使用 window.location.href
source              : '', // 來源(QQ空間會用到), 默認讀取head標簽:<meta name="site" content="http://overtrue" />
title               : '', // 標題,默認讀取 document.title 或者 <meta name="title" content="share.js" />
description         : '', // 描述, 默認讀取head標簽:<meta name="description" content="PHP弱類型的實現原理分析" />
image               : '', // 圖片, 默認取網頁中第一個img標簽
sites               : ['qzone', 'qq', 'weibo','wechat', 'douban'], // 啟用的站點
disabled            : ['google', 'facebook', 'twitter'], // 禁用的站點
wechatQrcodeTitle   : '微信掃一掃:分享', // 微信二維碼提示文字
wechatQrcodeHelper  : '<p>微信里點“發現”,掃一下</p><p>二維碼便可將本文分享至朋友圈。</p>'

4.問題錯誤:

圖標加載不出來:

解決方案:<link href='https://cdn.bootcss.com/social-share.js/1.0.16/css/share.min.css' rel="stylesheet"> 加這個到index.html的head 就可以了

 

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM