new Vue({
el: '#app',
data(){
results: []
}
});
I need assistance with implementing Vue directives, events, etc. within the markup of a Sweet Alert. The goal is to display an alert using Sweet Alert that includes an input for search filtering at the top. Subsequently, I aim to filter the results
array based on the input provided in the alert.
Unfortunately, it appears that Vue directives do not take effect in the Sweet Alert box since it lies outside the scope of #app
. Surprisingly, there seem to be few reported issues regarding this particular challenge, leading me to believe that I may have overlooked something subtle in my implementation.
Is there a workaround or method that allows for the use of Vue directives and events directly within the markup of a Sweet Alert popup?
swal({
title: 'Something',
html: `
<button @click="test">Press Me</button>
`
});
Your insights and guidance are greatly appreciated.