23 lines
516 B
JavaScript
23 lines
516 B
JavaScript
|
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'],
|
||
|
};
|
||
|
},
|
||
|
};
|