stash
This commit is contained in:
parent
f29209b257
commit
20ab9860f1
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
rawhtml(value) {
|
rawhtml(value) {
|
||||||
if (typeof this.format === 'function') {
|
if (typeof this.format === 'function') {
|
||||||
return this.format(value).replace(/ /g, ' ');
|
return this.format(value.replace(/ /g, ' '));
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
|
...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
|
||||||
formatText(value) {
|
formatText(value) {
|
||||||
return value.replace(/{{(.+?)}}/g, (match, key) => {
|
return value.replace(/{{(.+?)}}/g, (match, key) => {
|
||||||
return `<span class="text-primary">{{ ${key} }}</span>`;
|
return `<span class="text-primary">{{${key}}}</span>`;
|
||||||
}).replace(/\n/g, '<br>').replace(/\t/g, ' ');
|
}).replace(/\n/g, '<br>').replace(/\t/g, ' ');
|
||||||
},
|
},
|
||||||
changeMessageTemplate(id, message) {
|
changeMessageTemplate(id, message) {
|
||||||
|
|
Loading…
Reference in a new issue