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