シェアボタンのカスタムディレクティブ
npm install git+https://github.com/ohagip/vue-share-button.git
or
./src/vue-share-button.js
をコピペ
import VueShareButton from 'vue-share-button'
Vue.use(VueShareButton)
<button v-share-button="twitterShareData">Twitter</button>
<button v-share-button="facebookShareData">Facebook</button>
<button v-share-button="lineShareData">LINE</button>
twitterShareData = {
type: 'twitter',
url: 'https://ohagip.github.io/vue-share-button/',
text: 'シェアボタンのカスタムディレクティブ',
hash: ''
};
facebookShareData = {
type: 'facebook',
url: 'https://ohagip.github.io/vue-share-button/'
};
lineShareData = {
type: 'line',
url: 'https://ohagip.github.io/vue-share-button/'
};
npm run serve
npm run build