module.exports = { name: 'email-footer', asyncData(ctx) { return { isPreview: ctx.method === 'GET', }; }, created() { const embeded = []; this.files.map(file => { const src = this.isPreview ? `/api/${file}` : `cid:${file}`; embeded[file] = src; }); this.embeded = embeded; }, data() { return { files: [ /* '/assets/images/action.png', '/assets/images/info.png', */ '/assets/images/facebook.png', '/assets/images/twitter.png', '/assets/images/youtube.png', '/assets/images/pinterest.png', '/assets/images/instagram.png', '/assets/images/linkedin.png', ], }; }, };