使用插件
import Vue from 'vue'
import wxsdk from '@/utils/jssdk-389'
import shareImg from '@/assets/images/favicon.png';
let img = new Image();
img.src = shareImg
export default () => {
Vue.use(wxsdk,{
shareData :{
title : document.title,
desc: document.keywords,
link : window.location.href,
imgUrl: img.src
}**重点内容**
});
}
插件使用可传入选项对象option
Vue.use(MyPlugin, { someOption: true })