stash
This commit is contained in:
parent
008bdb78ff
commit
b6f072fcea
2 changed files with 5 additions and 2 deletions
|
@ -28,7 +28,6 @@ export default {
|
|||
},
|
||||
onchange(event) {
|
||||
this.$emit('input', event.target.innerText);
|
||||
this.value = event.target.innerText;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<ul>
|
||||
<li v-for="template in messageTemplates" :key="template.id">
|
||||
{{ template.name }}<br>
|
||||
<FormatedText :value="template.message" :format="formatText"/>
|
||||
<FormatedText :value="template.message" :format="formatText"
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 class="text-center">Message Template Variables</h3>
|
||||
|
@ -29,6 +30,9 @@ export default {
|
|||
return value.replace(/{{(.+?)}}/g, (match, key) => {
|
||||
return `<span class="text-primary">{{ ${key} }}</span>`;
|
||||
}).replace(/\n/g, '<br>').replace(/\t/g, ' ');
|
||||
},
|
||||
changeMessageTemplate(id, message) {
|
||||
console.log(id, message);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in a new issue