salix/print/report/email-footer/index.js

29 lines
739 B
JavaScript
Executable File

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