cnpm install ipfs-http-client --save
//main.js
import ipfsClient from 'ipfs-http-client'
const ipfs = ipfsClient({ host: 'example.com', port: '9001', protocol: 'https' })
Vue.prototype.ipfs = ipfs //挂载到全局
cnpm install ipfs-http-client --save
//main.js
import ipfsClient from 'ipfs-http-client'
const ipfs = ipfsClient({ host: 'example.com', port: '9001', protocol: 'https' })
Vue.prototype.ipfs = ipfs //挂载到全局