UNPKG

vue-socials

Version:

Social media share buttons and counts for Vue.js

45 lines (41 loc) 1.26 kB
import { defineComponent } from 'vue'; import getSerialisedParams from '../../utils/getSerialisedParams.js'; import BaseSocials from '../../mixins/BaseSocial/BaseSocial.js'; /** * Hey! * * SGmail component used for sending Email via GMail * @link https://mail.google.com/ * @example https://mail.google.com/mail/u/0/?view=cm&to=google@gmail.com&su=Title&subject=Subject&body=Hello%0AWorld&cc=google1@gmail.com&bcc=google2@gmail.com&fs=1&tf=1 */ /** * Share parameters for link */ var SGmail = /* #__PURE__ */defineComponent({ name: 'SGmail', mixins: [BaseSocials('Gmail')], computed: { networkURL: function networkURL() { var BASE_URL = 'https://mail.google.com/mail/'; var shareOptions = this.shareOptions; var to = shareOptions.to, su = shareOptions.su, body = shareOptions.body, cc = shareOptions.cc, bcc = shareOptions.bcc; var serialisedParams = getSerialisedParams({ view: 'cm', to: to, su: su, body: body, cc: cc, bcc: bcc }); return "".concat(BASE_URL).concat(serialisedParams); } }, render: function render() { return this.generateComponent(this.networkURL); } }); export default SGmail;