salix/print/reports/email-header/index.js

23 lines
516 B
JavaScript
Raw Normal View History

2019-01-22 08:55:35 +00:00
module.exports = {
name: 'email-header',
asyncData(ctx, params) {
return {
isPreview: ctx.method === 'GET',
};
},
created() {
const embeded = [];
this.attachments.map((attachment) => {
const src = this.isPreview ? attachment : `cid:${attachment}`;
embeded[attachment] = src;
});
this.embeded = embeded;
},
data() {
return {
attachments: ['/assets/images/logo.png'],
};
},
};