ohagip / vue-share-button

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-share-button

シェアボタンのカスタムディレクティブ

DEMO

Install

npm install git+https://github.com/ohagip/vue-share-button.git

or
./src/vue-share-button.jsをコピペ

Usage

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/'
};

Vue CLI npm script

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

About


Languages

Language:JavaScript 58.5%Language:Vue 29.3%Language:HTML 12.2%